-please get them into us now so your needs can be met.</p><p>Without further ado, here is the upgrade guide. Enjoy!</p><h2 id=suggested-steps>Suggested steps</h2><p>We suggest that you take these steps when upgrading:</p><ol start=0><li>Make sure to update other dependency versions in <code>Cargo.toml</code> if you use them explicitly: <code>bitcoin_hashes</code> to 0.12.0, <code>secp256k1</code> to 0.27.0</li><li>Remove all occurrences of <code>util::</code> referring to our crate</li><li>Replace <code>Script</code> with <a href=https://docs.rs/bitcoin/0.30.0/bitcoin/script/struct.ScriptBuf.html><code>ScriptBuf</code></a> (<code>s/\([^A-Za-z0-9]\)Script\([^A-Za-z0-9]\)/\1ScriptBuf\2/g</code> should work in most cases)</li><li>Replace instances of <code>.parse::<Address>()</code> with <code>.parse::<Address<_>>()</code></li><li>Call <code>require_network(network)</code> on parsed addresses (you’ll get no method found for <code>Address<NetworkUnchecked></code> errors)</li><li>Replace <code>locktime</code> with <a href=https://docs.rs/bitcoin/0.30.0/bitcoin/locktime/absolute/index.html><code>locktime::absolute</code></a></li><li>Replace <code>PackedLockTime</code> with just <a href=https://docs.rs/bitcoin/0.30.0/bitcoin/locktime/absolute/struct.LockTime.html><code>LockTime</code></a></li><li>Import key types from the <code>key</code> submodule rather than <code>schnorr</code> or <code>ecdsa</code></li><li>Replace <code>SchnorrSighashType</code> with <a href=https://docs.rs/bitcoin/0.30.0/bitcoin/sighash/struct.TapSighashType.html><code>TapSighashType</code></a></li><li>Replace <code>TapBranchHash</code> with <a href=https://docs.rs/bitcoin/0.30.0/bitcoin/taproot/struct.TapNodeHash.html><code>TapNodeHash</code></a></li><li>Change <code>hash_newtype!(FooHash, sha256::Hash, 32, doc="A hash of foo.");</code> to:</li></ol><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-rust data-lang=rust><span style=display:flex><span>hash_newtype! {
0 commit comments