]> Untitled Git - bitcoindevkit.org/blob
dfad991d270b0fbe2f8d7066a19bba98e1f11925
[bitcoindevkit.org] /
1 <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `TxBuilder` struct in crate `bdk`."><meta name="keywords" content="rust, rustlang, rust-lang, TxBuilder"><title>bdk::wallet::tx_builder::TxBuilder - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
2 <link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
3 <link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../bdk/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct TxBuilder</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.add_global_xpubs">add_global_xpubs</a><a href="#method.add_recipient">add_recipient</a><a href="#method.add_unspendable">add_unspendable</a><a href="#method.add_utxo">add_utxo</a><a href="#method.change_policy">change_policy</a><a href="#method.coin_selection">coin_selection</a><a href="#method.do_not_spend_change">do_not_spend_change</a><a href="#method.drain_wallet">drain_wallet</a><a href="#method.enable_rbf">enable_rbf</a><a href="#method.enable_rbf_with_sequence">enable_rbf_with_sequence</a><a href="#method.fee_absolute">fee_absolute</a><a href="#method.fee_rate">fee_rate</a><a href="#method.force_non_witness_utxo">force_non_witness_utxo</a><a href="#method.include_output_redeem_witness_script">include_output_redeem_witness_script</a><a href="#method.maintain_single_recipient">maintain_single_recipient</a><a href="#method.manually_selected_only">manually_selected_only</a><a href="#method.new">new</a><a href="#method.nlocktime">nlocktime</a><a href="#method.only_spend_change">only_spend_change</a><a href="#method.ordering">ordering</a><a href="#method.policy_path">policy_path</a><a href="#method.set_recipients">set_recipients</a><a href="#method.set_single_recipient">set_single_recipient</a><a href="#method.sighash">sighash</a><a href="#method.unspendable">unspendable</a><a href="#method.utxos">utxos</a><a href="#method.version">version</a><a href="#method.with_recipients">with_recipients</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Pointable">Pointable</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class="location"><a href="../../index.html">bdk</a>::<wbr><a href="../index.html">wallet</a>::<wbr><a href="index.html">tx_builder</a></p><script>window.sidebarCurrent = {name: "TxBuilder", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
4 <a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#75-97" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">bdk</a>::<wbr><a href="../index.html">wallet</a>::<wbr><a href="index.html">tx_builder</a>::<wbr><a class="struct" href="">TxBuilder</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct TxBuilder&lt;D:&nbsp;<a class="trait" href="../../../bdk/database/trait.Database.html" title="trait bdk::database::Database">Database</a>, Cs:&nbsp;<a class="trait" href="../../../bdk/wallet/coin_selection/trait.CoinSelectionAlgorithm.html" title="trait bdk::wallet::coin_selection::CoinSelectionAlgorithm">CoinSelectionAlgorithm</a>&lt;D&gt;, Ctx:&nbsp;<a class="trait" href="../../../bdk/wallet/tx_builder/trait.TxBuilderContext.html" title="trait bdk::wallet::tx_builder::TxBuilderContext">TxBuilderContext</a>&gt; { /* fields omitted */ }</pre></div><div class="docblock"><p>A transaction builder</p>
5 <p>This structure contains the configuration that the wallet must follow to build a transaction.</p>
6 <p>For an example see <a href="../../../bdk/wallet/tx_builder/index.html">this module</a>'s documentation;</p>
7 </div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl&lt;D:&nbsp;<a class="trait" href="../../../bdk/database/trait.Database.html" title="trait bdk::database::Database">Database</a>, Ctx:&nbsp;<a class="trait" href="../../../bdk/wallet/tx_builder/trait.TxBuilderContext.html" title="trait bdk::wallet::tx_builder::TxBuilderContext">TxBuilderContext</a>&gt; <a class="struct" href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, <a class="type" href="../../../bdk/wallet/coin_selection/type.DefaultCoinSelectionAlgorithm.html" title="type bdk::wallet::coin_selection::DefaultCoinSelectionAlgorithm">DefaultCoinSelectionAlgorithm</a>, Ctx&gt;</code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#145-150" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#147-149" title="goto source code">[src]</a></h4><div class="docblock"><p>Create an empty builder</p>
8 </div></div><h3 id="impl-1" class="impl"><code class="in-band">impl&lt;D:&nbsp;<a class="trait" href="../../../bdk/database/trait.Database.html" title="trait bdk::database::Database">Database</a>, Cs:&nbsp;<a class="trait" href="../../../bdk/wallet/coin_selection/trait.CoinSelectionAlgorithm.html" title="trait bdk::wallet::coin_selection::CoinSelectionAlgorithm">CoinSelectionAlgorithm</a>&lt;D&gt;, Ctx:&nbsp;<a class="trait" href="../../../bdk/wallet/tx_builder/trait.TxBuilderContext.html" title="trait bdk::wallet::tx_builder::TxBuilderContext">TxBuilderContext</a>&gt; <a class="struct" href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, Cs, Ctx&gt;</code><a href="#impl-1" class="anchor"></a><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#153-406" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fee_rate" class="method"><code>pub fn <a href="#method.fee_rate" class="fnname">fee_rate</a>(self, fee_rate: <a class="struct" href="../../../bdk/struct.FeeRate.html" title="struct bdk::FeeRate">FeeRate</a>) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#155-158" title="goto source code">[src]</a></h4><div class="docblock"><p>Set a custom fee rate</p>
9 </div><h4 id="method.fee_absolute" class="method"><code>pub fn <a href="#method.fee_absolute" class="fnname">fee_absolute</a>(self, fee_amount: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#161-164" title="goto source code">[src]</a></h4><div class="docblock"><p>Set an absolute fee</p>
10 </div><h4 id="method.policy_path" class="method"><code>pub fn <a href="#method.policy_path" class="fnname">policy_path</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;policy_path: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;keychain: <a class="enum" href="../../../bdk/enum.KeychainKind.html" title="enum bdk::KeychainKind">KeychainKind</a><br>) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#221-233" title="goto source code">[src]</a></h4><div class="docblock"><p>Set the policy path to use while creating the transaction for a given keychain.</p>
11 <p>This method accepts a map where the key is the policy node id (see
12 <a href="../../../bdk/descriptor/policy/struct.Policy.html#structfield.id"><code>Policy::id</code></a>) and the value is the list of the indexes of
13 the items that are intended to be satisfied from the policy node (see
14 <a href="../../../bdk/descriptor/policy/enum.SatisfiableItem.html#variant.Thresh.field.items"><code>SatisfiableItem::Thresh::items</code></a>).</p>
15 <h2 id="example" class="section-header"><a href="#example">Example</a></h2>
16 <p>An example of when the policy path is needed is the following descriptor:
17 <code>wsh(thresh(2,pk(A),sj:and_v(v:pk(B),n:older(6)),snj:and_v(v:pk(C),after(630000))))</code>,
18 derived from the miniscript policy <code>thresh(2,pk(A),and(pk(B),older(6)),and(pk(C),after(630000)))</code>.
19 It declares three descriptor fragments, and at the top level it uses <code>thresh()</code> to
20 ensure that at least two of them are satisfied. The individual fragments are:</p>
21 <ol>
22 <li><code>pk(A)</code></li>
23 <li><code>and(pk(B),older(6))</code></li>
24 <li><code>and(pk(C),after(630000))</code></li>
25 </ol>
26 <p>When those conditions are combined in pairs, it's clear that the transaction needs to be created
27 differently depending on how the user intends to satisfy the policy afterwards:</p>
28 <ul>
29 <li>If fragments <code>1</code> and <code>2</code> are used, the transaction will need to use a specific
30 <code>n_sequence</code> in order to spend an <code>OP_CSV</code> branch.</li>
31 <li>If fragments <code>1</code> and <code>3</code> are used, the transaction will need to use a specific <code>locktime</code>
32 in order to spend an <code>OP_CLTV</code> branch.</li>
33 <li>If fragments <code>2</code> and <code>3</code> are used, the transaction will need both.</li>
34 </ul>
35 <p>When the spending policy is represented as a tree (see
36 <a href="../../../bdk/wallet/struct.Wallet.html#method.policies"><code>Wallet::policies</code></a>), every node
37 is assigned a unique identifier that can be used in the policy path to specify which of
38 the node's children the user intends to satisfy: for instance, assuming the <code>thresh()</code>
39 root node of this example has an id of <code>aabbccdd</code>, the policy path map would look like:</p>
40 <p><code>{ &quot;aabbccdd&quot; =&gt; [0, 1] }</code></p>
41 <p>where the key is the node's id, and the value is a list of the children that should be
42 used, in no particular order.</p>
43 <p>If a particularly complex descriptor has multiple ambiguous thresholds in its structure,
44 multiple entries can be added to the map, one for each node that requires an explicit path.</p>
45
46 <div class="example-wrap"><pre class="rust rust-example-rendered">
47 <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">BTreeMap</span>::<span class="ident">new</span>();
48 <span class="ident">path</span>.<span class="ident">insert</span>(<span class="string">&quot;aabbccdd&quot;</span>.<span class="ident">to_string</span>(), <span class="macro">vec</span><span class="macro">!</span>[<span class="number">0</span>, <span class="number">1</span>]);
49
50 <span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">TxBuilder</span>::<span class="ident">with_recipients</span>(<span class="macro">vec</span><span class="macro">!</span>[(<span class="ident">to_address</span>.<span class="ident">script_pubkey</span>(), <span class="number">50_000</span>)])
51 .<span class="ident">policy_path</span>(<span class="ident">path</span>, <span class="ident">KeychainKind</span>::<span class="ident">External</span>);</pre></div>
52 </div><h4 id="method.utxos" class="method"><code>pub fn <a href="#method.utxos" class="fnname">utxos</a>(self, utxos: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;OutPoint&gt;) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#239-242" title="goto source code">[src]</a></h4><div class="docblock"><p>Replace the internal list of utxos that <strong>must</strong> be spent with a new list</p>
53 <p>These have priority over the &quot;unspendable&quot; utxos, meaning that if a utxo is present both in
54 the &quot;utxos&quot; and the &quot;unspendable&quot; list, it will be spent.</p>
55 </div><h4 id="method.add_utxo" class="method"><code>pub fn <a href="#method.add_utxo" class="fnname">add_utxo</a>(self, utxo: OutPoint) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#248-251" title="goto source code">[src]</a></h4><div class="docblock"><p>Add a utxo to the internal list of utxos that <strong>must</strong> be spent</p>
56 <p>These have priority over the &quot;unspendable&quot; utxos, meaning that if a utxo is present both in
57 the &quot;utxos&quot; and the &quot;unspendable&quot; list, it will be spent.</p>
58 </div><h4 id="method.manually_selected_only" class="method"><code>pub fn <a href="#method.manually_selected_only" class="fnname">manually_selected_only</a>(self) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#260-263" title="goto source code">[src]</a></h4><div class="docblock"><p>Only spend utxos added by <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.add_utxo"><code>add_utxo</code></a> and <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.utxos"><code>utxos</code></a>.</p>
59 <p>The wallet will <strong>not</strong> add additional utxos to the transaction even if they are needed to
60 make the transaction valid.</p>
61 </div><h4 id="method.unspendable" class="method"><code>pub fn <a href="#method.unspendable" class="fnname">unspendable</a>(self, unspendable: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;OutPoint&gt;) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#270-273" title="goto source code">[src]</a></h4><div class="docblock"><p>Replace the internal list of unspendable utxos with a new list</p>
62 <p>It's important to note that the &quot;must-be-spent&quot; utxos added with <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.utxos" title="TxBuilder::utxos"><code>TxBuilder::utxos</code></a> and
63 <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.add_utxo" title="TxBuilder::add_utxo"><code>TxBuilder::add_utxo</code></a> have priority over these. See the docs of the two linked methods
64 for more details.</p>
65 </div><h4 id="method.add_unspendable" class="method"><code>pub fn <a href="#method.add_unspendable" class="fnname">add_unspendable</a>(self, unspendable: OutPoint) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#280-283" title="goto source code">[src]</a></h4><div class="docblock"><p>Add a utxo to the internal list of unspendable utxos</p>
66 <p>It's important to note that the &quot;must-be-spent&quot; utxos added with <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.utxos" title="TxBuilder::utxos"><code>TxBuilder::utxos</code></a> and
67 <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.add_utxo" title="TxBuilder::add_utxo"><code>TxBuilder::add_utxo</code></a> have priority over this. See the docs of the two linked methods
68 for more details.</p>
69 </div><h4 id="method.sighash" class="method"><code>pub fn <a href="#method.sighash" class="fnname">sighash</a>(self, sighash: SigHashType) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#288-291" title="goto source code">[src]</a></h4><div class="docblock"><p>Sign with a specific sig hash</p>
70 <p><strong>Use this option very carefully</strong></p>
71 </div><h4 id="method.ordering" class="method"><code>pub fn <a href="#method.ordering" class="fnname">ordering</a>(self, ordering: <a class="enum" href="../../../bdk/wallet/tx_builder/enum.TxOrdering.html" title="enum bdk::wallet::tx_builder::TxOrdering">TxOrdering</a>) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#294-297" title="goto source code">[src]</a></h4><div class="docblock"><p>Choose the ordering for inputs and outputs of the transaction</p>
72 </div><h4 id="method.nlocktime" class="method"><code>pub fn <a href="#method.nlocktime" class="fnname">nlocktime</a>(self, locktime: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#302-305" title="goto source code">[src]</a></h4><div class="docblock"><p>Use a specific nLockTime while creating the transaction</p>
73 <p>This can cause conflicts if the wallet's descriptors contain an &quot;after&quot; (OP_CLTV) operator.</p>
74 </div><h4 id="method.version" class="method"><code>pub fn <a href="#method.version" class="fnname">version</a>(self, version: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#311-314" title="goto source code">[src]</a></h4><div class="docblock"><p>Build a transaction with a specific version</p>
75 <p>The <code>version</code> should always be greater than <code>0</code> and greater than <code>1</code> if the wallet's
76 descriptors contain an &quot;older&quot; (OP_CSV) operator.</p>
77 </div><h4 id="method.do_not_spend_change" class="method"><code>pub fn <a href="#method.do_not_spend_change" class="fnname">do_not_spend_change</a>(self) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#320-323" title="goto source code">[src]</a></h4><div class="docblock"><p>Do not spend change outputs</p>
78 <p>This effectively adds all the change outputs to the &quot;unspendable&quot; list. See
79 <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.unspendable" title="TxBuilder::unspendable"><code>TxBuilder::unspendable</code></a>.</p>
80 </div><h4 id="method.only_spend_change" class="method"><code>pub fn <a href="#method.only_spend_change" class="fnname">only_spend_change</a>(self) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#329-332" title="goto source code">[src]</a></h4><div class="docblock"><p>Only spend change outputs</p>
81 <p>This effectively adds all the non-change outputs to the &quot;unspendable&quot; list. See
82 <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.unspendable" title="TxBuilder::unspendable"><code>TxBuilder::unspendable</code></a>.</p>
83 </div><h4 id="method.change_policy" class="method"><code>pub fn <a href="#method.change_policy" class="fnname">change_policy</a>(self, change_policy: <a class="enum" href="../../../bdk/wallet/tx_builder/enum.ChangeSpendPolicy.html" title="enum bdk::wallet::tx_builder::ChangeSpendPolicy">ChangeSpendPolicy</a>) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#336-339" title="goto source code">[src]</a></h4><div class="docblock"><p>Set a specific <a href="../../../bdk/wallet/tx_builder/enum.ChangeSpendPolicy.html" title="ChangeSpendPolicy"><code>ChangeSpendPolicy</code></a>. See <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.do_not_spend_change" title="TxBuilder::do_not_spend_change"><code>TxBuilder::do_not_spend_change</code></a> and
84 <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.only_spend_change" title="TxBuilder::only_spend_change"><code>TxBuilder::only_spend_change</code></a> for some shortcuts.</p>
85 </div><h4 id="method.force_non_witness_utxo" class="method"><code>pub fn <a href="#method.force_non_witness_utxo" class="fnname">force_non_witness_utxo</a>(self) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#345-348" title="goto source code">[src]</a></h4><div class="docblock"><p>Fill-in the <a href="bitcoin::util::psbt::Input::non_witness_utxo"><code>psbt::Input::non_witness_utxo</code></a> field even if the wallet only has SegWit
86 descriptors.</p>
87 <p>This is useful for signers which always require it, like Trezor hardware wallets.</p>
88 </div><h4 id="method.include_output_redeem_witness_script" class="method"><code>pub fn <a href="#method.include_output_redeem_witness_script" class="fnname">include_output_redeem_witness_script</a>(self) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#354-357" title="goto source code">[src]</a></h4><div class="docblock"><p>Fill-in the <a href="bitcoin::util::psbt::Output::redeem_script"><code>psbt::Output::redeem_script</code></a> and
89 <a href="bitcoin::util::psbt::Output::witness_script"><code>psbt::Output::witness_script</code></a> fields.</p>
90 <p>This is useful for signers which always require it, like ColdCard hardware wallets.</p>
91 </div><h4 id="method.add_global_xpubs" class="method"><code>pub fn <a href="#method.add_global_xpubs" class="fnname">add_global_xpubs</a>(self) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#364-367" title="goto source code">[src]</a></h4><div class="docblock"><p>Fill-in the <code>PSBT_GLOBAL_XPUB</code> field with the extended keys contained in both the external
92 and internal descriptors</p>
93 <p>This is useful for offline signers that take part to a multisig. Some hardware wallets like
94 BitBox and ColdCard are known to require this.</p>
95 </div><h4 id="method.drain_wallet" class="method"><code>pub fn <a href="#method.drain_wallet" class="fnname">drain_wallet</a>(self) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#370-373" title="goto source code">[src]</a></h4><div class="docblock"><p>Spend all the available inputs. This respects filters like <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.unspendable" title="TxBuilder::unspendable"><code>TxBuilder::unspendable</code></a> and the change policy.</p>
96 </div><h4 id="method.coin_selection" class="method"><code>pub fn <a href="#method.coin_selection" class="fnname">coin_selection</a>&lt;P:&nbsp;<a class="trait" href="../../../bdk/wallet/coin_selection/trait.CoinSelectionAlgorithm.html" title="trait bdk::wallet::coin_selection::CoinSelectionAlgorithm">CoinSelectionAlgorithm</a>&lt;D&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;coin_selection: P<br>) -&gt; <a class="struct" href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, P, Ctx&gt;</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#378-405" title="goto source code">[src]</a></h4><div class="docblock"><p>Choose the coin selection algorithm</p>
97 <p>Overrides the <a href="../../../bdk/wallet/coin_selection/type.DefaultCoinSelectionAlgorithm.html"><code>DefaultCoinSelectionAlgorithm</code></a>.</p>
98 </div></div><h3 id="impl-2" class="impl"><code class="in-band">impl&lt;D:&nbsp;<a class="trait" href="../../../bdk/database/trait.Database.html" title="trait bdk::database::Database">Database</a>&gt; <a class="struct" href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, <a class="type" href="../../../bdk/wallet/coin_selection/type.DefaultCoinSelectionAlgorithm.html" title="type bdk::wallet::coin_selection::DefaultCoinSelectionAlgorithm">DefaultCoinSelectionAlgorithm</a>, <a class="struct" href="../../../bdk/wallet/tx_builder/struct.CreateTx.html" title="struct bdk::wallet::tx_builder::CreateTx">CreateTx</a>&gt;</code><a href="#impl-2" class="anchor"></a><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#409-414" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.with_recipients" class="method"><code>pub fn <a href="#method.with_recipients" class="fnname">with_recipients</a>(recipients: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Script, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#411-413" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a builder starting from a list of recipients</p>
99 </div></div><h3 id="impl-3" class="impl"><code class="in-band">impl&lt;D:&nbsp;<a class="trait" href="../../../bdk/database/trait.Database.html" title="trait bdk::database::Database">Database</a>, Cs:&nbsp;<a class="trait" href="../../../bdk/wallet/coin_selection/trait.CoinSelectionAlgorithm.html" title="trait bdk::wallet::coin_selection::CoinSelectionAlgorithm">CoinSelectionAlgorithm</a>&lt;D&gt;&gt; <a class="struct" href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, Cs, <a class="struct" href="../../../bdk/wallet/tx_builder/struct.CreateTx.html" title="struct bdk::wallet::tx_builder::CreateTx">CreateTx</a>&gt;</code><a href="#impl-3" class="anchor"></a><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#417-470" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.set_recipients" class="method"><code>pub fn <a href="#method.set_recipients" class="fnname">set_recipients</a>(self, recipients: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Script, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#419-422" title="goto source code">[src]</a></h4><div class="docblock"><p>Replace the recipients already added with a new list</p>
100 </div><h4 id="method.add_recipient" class="method"><code>pub fn <a href="#method.add_recipient" class="fnname">add_recipient</a>(self, script_pubkey: Script, amount: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#425-428" title="goto source code">[src]</a></h4><div class="docblock"><p>Add a recipient to the internal list</p>
101 </div><h4 id="method.set_single_recipient" class="method"><code>pub fn <a href="#method.set_single_recipient" class="fnname">set_single_recipient</a>(self, recipient: Script) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#444-449" title="goto source code">[src]</a></h4><div class="docblock"><p>Set a single recipient that will get all the selected funds minus the fee. No change will
102 be created</p>
103 <p>This method overrides any recipient set with <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.set_recipients"><code>set_recipients</code></a> or
104 <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.add_recipient"><code>add_recipient</code></a>.</p>
105 <p>It can only be used in conjunction with <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.drain_wallet"><code>drain_wallet</code></a> to send the
106 entire content of the wallet (minus filters) to a single recipient or with a
107 list of manually selected UTXOs by enabling <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.manually_selected_only"><code>manually_selected_only</code></a>
108 and selecting them with <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.utxos"><code>utxos</code></a> or <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.add_utxo"><code>add_utxo</code></a>.</p>
109 <p>When bumping the fees of a transaction made with this option, the user should remeber to
110 add <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.maintain_single_recipient"><code>maintain_single_recipient</code></a> to correctly update the
111 single output instead of adding one more for the change.</p>
112 </div><h4 id="method.enable_rbf" class="method"><code>pub fn <a href="#method.enable_rbf" class="fnname">enable_rbf</a>(self) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#454-457" title="goto source code">[src]</a></h4><div class="docblock"><p>Enable signaling RBF</p>
113 <p>This will use the default nSequence value of <code>0xFFFFFFFD</code>.</p>
114 </div><h4 id="method.enable_rbf_with_sequence" class="method"><code>pub fn <a href="#method.enable_rbf_with_sequence" class="fnname">enable_rbf_with_sequence</a>(self, nsequence: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#466-469" title="goto source code">[src]</a></h4><div class="docblock"><p>Enable signaling RBF with a specific nSequence value</p>
115 <p>This can cause conflicts if the wallet's descriptors contain an &quot;older&quot; (OP_CSV) operator
116 and the given <code>nsequence</code> is lower than the CSV value.</p>
117 <p>If the <code>nsequence</code> is higher than <code>0xFFFFFFFD</code> an error will be thrown, since it would not
118 be a valid nSequence to signal RBF.</p>
119 </div></div><h3 id="impl-4" class="impl"><code class="in-band">impl&lt;D:&nbsp;<a class="trait" href="../../../bdk/database/trait.Database.html" title="trait bdk::database::Database">Database</a>&gt; <a class="struct" href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, <a class="type" href="../../../bdk/wallet/coin_selection/type.DefaultCoinSelectionAlgorithm.html" title="type bdk::wallet::coin_selection::DefaultCoinSelectionAlgorithm">DefaultCoinSelectionAlgorithm</a>, <a class="struct" href="../../../bdk/wallet/tx_builder/struct.BumpFee.html" title="struct bdk::wallet::tx_builder::BumpFee">BumpFee</a>&gt;</code><a href="#impl-4" class="anchor"></a><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#473-491" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.maintain_single_recipient" class="method"><code>pub fn <a href="#method.maintain_single_recipient" class="fnname">maintain_single_recipient</a>(self) -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#487-490" title="goto source code">[src]</a></h4><div class="docblock"><p>Bump the fees of a transaction made with <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.set_single_recipient"><code>set_single_recipient</code></a></p>
120 <p>Unless extra inputs are specified with <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.add_utxo"><code>add_utxo</code></a> or <a href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html#method.utxos"><code>utxos</code></a>, this flag will make
121 <code>bump_fee</code> reduce the value of the existing output, or fail if it would be consumed
122 entirely given the higher new fee rate.</p>
123 <p>If extra inputs are added and they are not entirely consumed in fees, a change output will not
124 be added; the existing output will simply grow in value.</p>
125 <p>Fails if the transaction has more than one outputs.</p>
126 </div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl&lt;D:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="../../../bdk/database/trait.Database.html" title="trait bdk::database::Database">Database</a>, Cs:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="../../../bdk/wallet/coin_selection/trait.CoinSelectionAlgorithm.html" title="trait bdk::wallet::coin_selection::CoinSelectionAlgorithm">CoinSelectionAlgorithm</a>&lt;D&gt;, Ctx:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="../../../bdk/wallet/tx_builder/trait.TxBuilderContext.html" title="trait bdk::wallet::tx_builder::TxBuilderContext">TxBuilderContext</a>&gt; <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="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, Cs, Ctx&gt;</code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#74" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#74" title="goto source code">[src]</a></h4><div class='docblock hidden'><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>
127 </div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl&lt;D:&nbsp;<a class="trait" href="../../../bdk/database/trait.Database.html" title="trait bdk::database::Database">Database</a>, Cs:&nbsp;<a class="trait" href="../../../bdk/wallet/coin_selection/trait.CoinSelectionAlgorithm.html" title="trait bdk::wallet::coin_selection::CoinSelectionAlgorithm">CoinSelectionAlgorithm</a>&lt;D&gt;, Ctx:&nbsp;<a class="trait" href="../../../bdk/wallet/tx_builder/trait.TxBuilderContext.html" title="trait bdk::wallet::tx_builder::TxBuilderContext">TxBuilderContext</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, Cs, Ctx&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Cs: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,&nbsp;</span></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#112-142" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -&gt; Self</code><a class="srclink" href="../../../src/bdk/wallet/tx_builder.rs.html#117-141" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the &quot;default value&quot; for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
128 </div></div></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"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl&lt;D, Cs, Ctx&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, Cs, Ctx&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Cs: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ctx: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>,&nbsp;</span></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/bdk/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl&lt;D, Cs, Ctx&gt; <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="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, Cs, Ctx&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Cs: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ctx: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,&nbsp;</span></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/bdk/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl&lt;D, Cs, Ctx&gt; <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="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, Cs, Ctx&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Cs: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ctx: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,&nbsp;</span></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/bdk/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl&lt;D, Cs, Ctx&gt; <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="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, Cs, Ctx&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Cs: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ctx: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,&nbsp;</span></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/bdk/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl&lt;D, Cs, Ctx&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../bdk/wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>&lt;D, Cs, Ctx&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Cs: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ctx: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,&nbsp;</span></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/bdk/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></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"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><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>
129 </div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><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>
130 </div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><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>
131 </div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
132 </div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing/0.1.22/src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="https://docs.rs/tracing/0.1.22/src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
133 <code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
134 </div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="https://docs.rs/tracing/0.1.22/src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
135 <code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
136 </div></div><h3 id="impl-Instrument-1" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html" title="trait tracing_futures::Instrument">Instrument</a> for T</code><a href="#impl-Instrument-1" class="anchor"></a><a class="srclink" href="https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#248" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -&gt; <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#129-131" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
137 <code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.instrument">Read more</a></p>
138 </div><h4 id="method.in_current_span-1" class="method hidden"><code>pub fn <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#166-168" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="https://docs.rs/tracing/latest/tracing/span/struct.Span.html#method.current">current</a> <code>Span</code>, returning an
139 <code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.in_current_span">Read more</a></p>
140 </div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
141 </div></div><h3 id="impl-Pointable" class="impl"><code class="in-band">impl&lt;T&gt; Pointable for T</code><a href="#impl-Pointable" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedconstant.ALIGN" class="associatedconstant hidden"><code>pub const <a href="#associatedconstant.ALIGN" class="constant"><b>ALIGN</b></a>: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></h4><div class='docblock hidden'><p>The alignment of pointer.</p>
142 </div><h4 id="associatedtype.Init" class="type"><code>type <a href="#associatedtype.Init" class="type">Init</a> = T</code></h4><div class='docblock'><p>The type for initializers.</p>
143 </div><h4 id="method.init" class="method hidden"><code>pub unsafe fn <a href="#method.init" class="fnname">init</a>(init: &lt;T as Pointable&gt;::Init) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></h4><div class='docblock hidden'><p>Initializes a with the given initializer. <a href="#tymethod.init">Read more</a></p>
144 </div><h4 id="method.deref" class="method hidden"><code>pub unsafe fn <a href="#method.deref" class="fnname">deref</a>&lt;'a&gt;(ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>T</code></h4><div class='docblock hidden'><p>Dereferences the given pointer. <a href="#tymethod.deref">Read more</a></p>
145 </div><h4 id="method.deref_mut" class="method hidden"><code>pub unsafe fn <a href="#method.deref_mut" class="fnname">deref_mut</a>&lt;'a&gt;(ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>T</code></h4><div class='docblock hidden'><p>Mutably dereferences the given pointer. <a href="#tymethod.deref_mut">Read more</a></p>
146 </div><h4 id="method.drop" class="method hidden"><code>pub unsafe fn <a href="#method.drop" class="fnname">drop</a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code></h4><div class='docblock hidden'><p>Drops the object pointed to by the given pointer. <a href="#tymethod.drop">Read more</a></p>
147 </div></div><h3 id="impl-Same%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; Same&lt;T&gt; for T</code><a href="#impl-Same%3CT%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="associatedtype.Output" class="type"><code>type <a href="#associatedtype.Output" class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
148 </div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
149 </div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
150 </div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
151 </div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
152 </div></div><h3 id="impl-VZip%3CV%3E" class="impl"><code class="in-band">impl&lt;V, T&gt; VZip&lt;V&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;V: MultiLane&lt;T&gt;,&nbsp;</span></code><a href="#impl-VZip%3CV%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.vzip" class="method hidden"><code>pub fn <a href="#method.vzip" class="fnname">vzip</a>(self) -&gt; V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "bdk";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>