diff --git a/docs/next/core/addresses.html b/docs/next/core/addresses.html index 5227bedb45..e528ea846a 100644 --- a/docs/next/core/addresses.html +++ b/docs/next/core/addresses.html @@ -80,7 +80,7 @@ reason to keep using legacy transaction formats.

val privkey = ECPrivateKey() // privkey: ECPrivateKey = Masked(ECPrivateKeyImpl) val pubkey = privkey.publicKey -// pubkey: org.bitcoins.crypto.ECPublicKey = ECPublicKey(02fc6b74956a32e8d9faaf3312a72ac58bc696d1cadf64331c91c4543822d12fb6) +// pubkey: org.bitcoins.crypto.ECPublicKey = ECPublicKey(0270d81cae54eb7723665089cb79a1b1db2f2f01c1c00ff7e8c90f29eecd68a420) val segwitAddress = { // see https://bitcoin.org/en/glossary/pubkey-script @@ -89,10 +89,10 @@ reason to keep using legacy transaction formats.

val scriptPubKey = P2WPKHWitnessSPKV0(pubkey) Bech32Address(scriptPubKey, TestNet3) } -// segwitAddress: Bech32Address = tb1q3avrt0aayk66ypw4yy5c88eqaac8ngynv9r9ga +// segwitAddress: Bech32Address = tb1qe66d9pqrgy65x07dga8tah6pxsd5vdnzjcldqa println(segwitAddress.toString) -// tb1q3avrt0aayk66ypw4yy5c88eqaac8ngynv9r9ga +// tb1qe66d9pqrgy65x07dga8tah6pxsd5vdnzjcldqa

Generating legacy (base58) addresses

If you need to generate legacy addresses for backwards @@ -101,10 +101,10 @@ Take a look:

// we're reusing the same private/public key pair
 // from before. don't do this in an actual application!
 val legacyAddress = P2PKHAddress(pubkey, TestNet3)
-// legacyAddress: P2PKHAddress = mtatbRNbC4CWHvj2Rsdf2945aAr1vvpa4u
+// legacyAddress: P2PKHAddress = mzMv7Ktz7ZGoc1m117ekCuqdL7qgw9z2WP
 
 println(legacyAddress.toString)
-// mtatbRNbC4CWHvj2Rsdf2945aAr1vvpa4u
+// mzMv7Ktz7ZGoc1m117ekCuqdL7qgw9z2WP
 
Core ModuleHD Key Generation
Edit

TxBuilder Example

Bitcoin-S features a transaction building API that allows you to construct and sign Bitcoin transactions. Here's an example of how to use it

implicit val ec: ExecutionContext = ExecutionContext.Implicits.global
-// ec: ExecutionContext = scala.concurrent.impl.ExecutionContextImpl$$anon$3@10698e48[Running, parallelism = 2, size = 2, active = 0, running = 0, steals = 35, tasks = 0, submissions = 0]
+// ec: ExecutionContext = scala.concurrent.impl.ExecutionContextImpl$$anon$3@62d742de[Running, parallelism = 2, size = 2, active = 0, running = 0, steals = 33, tasks = 0, submissions = 0]
 
 // Initialize a transaction builder
 val builder = RawTxBuilder()
@@ -74,19 +74,19 @@
 val privKey = ECPrivateKey.freshPrivateKey
 // privKey: ECPrivateKey = Masked(ECPrivateKeyImpl)
 val pubKey = privKey.publicKey
-// pubKey: ECPublicKey = ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f)
+// pubKey: ECPublicKey = ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7)
 
 // this is the script that the TxBuilder is going to create a
 // script signature that validly spends this scriptPubKey
 val creditingSpk = P2PKHScriptPubKey(pubKey = privKey.publicKey)
-// creditingSpk: P2PKHScriptPubKey = pkh(c543241c8638626fd9dd10b02f5134931ae55a40)
+// creditingSpk: P2PKHScriptPubKey = pkh(6f6f10668300bf1eb11e9e3fb96fe98d379b8902)
 val amount = 10000.satoshis
 // amount: Satoshis = 10000 sats
 
 // this is the UTXO we are going to be spending
 val utxo =
   TransactionOutput(value = amount, scriptPubKey = creditingSpk)
-// utxo: TransactionOutput = TransactionOutput(10000 sats,pkh(c543241c8638626fd9dd10b02f5134931ae55a40))
+// utxo: TransactionOutput = TransactionOutput(10000 sats,pkh(6f6f10668300bf1eb11e9e3fb96fe98d379b8902))
 
 // the private key that locks the funds for the script we are spending too
 val destinationPrivKey = ECPrivateKey.freshPrivateKey
@@ -99,7 +99,7 @@
 // the script that corresponds to destination private key, this is what is receiving the money
 val destinationSPK =
   P2PKHScriptPubKey(pubKey = destinationPrivKey.publicKey)
-// destinationSPK: P2PKHScriptPubKey = pkh(eb819298c42075280d11b426a16061f00ecdf713)
+// destinationSPK: P2PKHScriptPubKey = pkh(07d2e97945fe5869ec1bb1eda76816d96bfe6a53)
 
 // this is where we are sending money too
 // we could add more destinations here if we
@@ -110,7 +110,7 @@
 
     Vector(destination0)
 }
-// destinations: Vector[TransactionOutput] = Vector(TransactionOutput(5000 sats,pkh(eb819298c42075280d11b426a16061f00ecdf713)))
+// destinations: Vector[TransactionOutput] = Vector(TransactionOutput(5000 sats,pkh(07d2e97945fe5869ec1bb1eda76816d96bfe6a53)))
 
 // Add the destinations to the tx builder
 builder ++= destinations
@@ -123,17 +123,17 @@ builder ++= destinations
                                   inputs = Vector.empty,
                                   outputs = Vector(utxo),
                                   lockTime = UInt32.zero)
-// creditingTx: BaseTransaction = BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(c543241c8638626fd9dd10b02f5134931ae55a40))),UInt32Impl(0))
+// creditingTx: BaseTransaction = BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(6f6f10668300bf1eb11e9e3fb96fe98d379b8902))),UInt32Impl(0))
 
 // this is the information we need from the crediting TX
 // to properly "link" it in the transaction we are creating
 val outPoint = TransactionOutPoint(creditingTx.txId, UInt32.zero)
-// outPoint: TransactionOutPoint = TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0)
+// outPoint: TransactionOutPoint = TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0)
 val input = TransactionInput(
     outPoint,
     EmptyScriptSignature,
     sequenceNumber = UInt32.zero)
-// input: TransactionInput = TransactionInputImpl(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),EmptyScriptSignature,UInt32Impl(0))
+// input: TransactionInput = TransactionInputImpl(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),EmptyScriptSignature,UInt32Impl(0))
 
 // Add a new input to our builder
 builder += input
@@ -141,11 +141,11 @@ builder += input
 
 // We can now generate a RawTxBuilderResult ready to be finalized
 val builderResult = builder.result()
-// builderResult: RawTxBuilderResult = RawTxBuilderResult(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),EmptyScriptSignature,UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(eb819298c42075280d11b426a16061f00ecdf713))),UInt32Impl(0))
+// builderResult: RawTxBuilderResult = RawTxBuilderResult(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),EmptyScriptSignature,UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(07d2e97945fe5869ec1bb1eda76816d96bfe6a53))),UInt32Impl(0))
 
 // this contains the information needed to analyze our input during finalization
 val inputInfo = P2PKHInputInfo(outPoint, amount, privKey.publicKey)
-// inputInfo: P2PKHInputInfo = P2PKHInputInfo(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),10000 sats,ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f))
+// inputInfo: P2PKHInputInfo = P2PKHInputInfo(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),10000 sats,ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7))
 
 // this is how much we are going to pay as a fee to the network
 // for this example, we are going to pay 1 satoshi per byte
@@ -155,18 +155,18 @@ builder += input
 val changePrivKey = ECPrivateKey.freshPrivateKey
 // changePrivKey: ECPrivateKey = Masked(ECPrivateKeyImpl)
 val changeSPK = P2PKHScriptPubKey(pubKey = changePrivKey.publicKey)
-// changeSPK: P2PKHScriptPubKey = pkh(1e6dbb1fa5b7956309a02dd55b9995643b4ba9a5)
+// changeSPK: P2PKHScriptPubKey = pkh(879b0d029890bdcab28006f929e21268f88c4085)
 
 // We chose a finalizer that adds a change output to our tx based on a fee rate
 val finalizer = StandardNonInteractiveFinalizer(
     Vector(inputInfo),
     feeRate,
     changeSPK)
-// finalizer: StandardNonInteractiveFinalizer = StandardNonInteractiveFinalizer(Vector(P2PKHInputInfo(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),10000 sats,ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f))),1 sats/byte,pkh(1e6dbb1fa5b7956309a02dd55b9995643b4ba9a5))
+// finalizer: StandardNonInteractiveFinalizer = StandardNonInteractiveFinalizer(Vector(P2PKHInputInfo(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),10000 sats,ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7))),1 sats/byte,pkh(879b0d029890bdcab28006f929e21268f88c4085))
 
 // We can now finalize the tx builder result from earlier with this finalizer
 val unsignedTxF: Future[Transaction] = finalizer.buildTx(builderResult)
-// unsignedTxF: Future[Transaction] = Future(Success(BaseTransaction(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),EmptyScriptSignature,UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(eb819298c42075280d11b426a16061f00ecdf713)), TransactionOutput(4775 sats,pkh(1e6dbb1fa5b7956309a02dd55b9995643b4ba9a5))),UInt32Impl(0))))
+// unsignedTxF: Future[Transaction] = Future(Success(BaseTransaction(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),EmptyScriptSignature,UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(07d2e97945fe5869ec1bb1eda76816d96bfe6a53)), TransactionOutput(4775 sats,pkh(879b0d029890bdcab28006f929e21268f88c4085))),UInt32Impl(0))))
 
 // We now turn to signing the unsigned transaction
 // this contains all the information we need to
@@ -176,12 +176,12 @@ builder += input
                                      signers = Vector(privKey),
                                      hashType =
                                          HashType.sigHashAll)
-// utxoInfo: ScriptSignatureParams[P2PKHInputInfo] = ScriptSignatureParams(P2PKHInputInfo(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),10000 sats,ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f)),BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(c543241c8638626fd9dd10b02f5134931ae55a40))),UInt32Impl(0)),Vector(Masked(ECPrivateKeyImpl)),SIGHASH_ALL(Int32Impl(1)))
+// utxoInfo: ScriptSignatureParams[P2PKHInputInfo] = ScriptSignatureParams(P2PKHInputInfo(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),10000 sats,ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7)),BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(6f6f10668300bf1eb11e9e3fb96fe98d379b8902))),UInt32Impl(0)),Vector(Masked(ECPrivateKeyImpl)),SIGHASH_ALL(Int32Impl(1)))
 
 // all of the UTXO spending information, since we only have
 // one input, this is just one element
 val utxoInfos: Vector[ScriptSignatureParams[InputInfo]] = Vector(utxoInfo)
-// utxoInfos: Vector[ScriptSignatureParams[InputInfo]] = Vector(ScriptSignatureParams(P2PKHInputInfo(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),10000 sats,ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f)),BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(c543241c8638626fd9dd10b02f5134931ae55a40))),UInt32Impl(0)),Vector(Masked(ECPrivateKeyImpl)),SIGHASH_ALL(Int32Impl(1))))
+// utxoInfos: Vector[ScriptSignatureParams[InputInfo]] = Vector(ScriptSignatureParams(P2PKHInputInfo(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),10000 sats,ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7)),BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(6f6f10668300bf1eb11e9e3fb96fe98d379b8902))),UInt32Impl(0)),Vector(Masked(ECPrivateKeyImpl)),SIGHASH_ALL(Int32Impl(1))))
 
 // Yay! Now we use the RawTxSigner object to sign the tx.
 // The 'sign' method is going produce a validly signed transaction
@@ -201,7 +201,7 @@ builder += input
   }
   Await.result(signedTxF, 30.seconds)
 }
-// signedTx: Transaction = BaseTransaction(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),P2PKHScriptSignature(ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f), ECDigitalSignature(3044022061a7e63c6e5c864558c11b8782aa0ca43337132935d2951dd13670a8bdfe77b902207388b8a0bf0caacd2aed9caa2bb2e760810b619ee641da75154c3b76e34d336601)),UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(eb819298c42075280d11b426a16061f00ecdf713)), TransactionOutput(4775 sats,pkh(1e6dbb1fa5b7956309a02dd55b9995643b4ba9a5))),UInt32Impl(0))
+// signedTx: Transaction = BaseTransaction(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),P2PKHScriptSignature(ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7), ECDigitalSignature(304402206eeda5ce464051e1b83735bf4c7e5756bc4535e24eba0a480c4cf7a53632b81d022051d9c074ab5a8e745bdf17c0f4f46642e5944f54a2b65c7de6e7d3d98e44008801)),UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(07d2e97945fe5869ec1bb1eda76816d96bfe6a53)), TransactionOutput(4775 sats,pkh(879b0d029890bdcab28006f929e21268f88c4085))),UInt32Impl(0))
 
signedTx.inputs.length
 // res2: Int = 1
@@ -211,7 +211,7 @@ signedTx.outputs.length
 
 //remember, you can call .hex on any bitcoin-s data structure to get the hex representation!
 signedTx.hex
-// res4: String = 0200000001cc78a40378540c672ac220a6ae7f10465e6e2cd4b62a59ee60f047ce9f5e3518000000006a473044022061a7e63c6e5c864558c11b8782aa0ca43337132935d2951dd13670a8bdfe77b902207388b8a0bf0caacd2aed9caa2bb2e760810b619ee641da75154c3b76e34d3366012103b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f000000000288130000000000001976a914eb819298c42075280d11b426a16061f00ecdf71388aca7120000000000001976a9141e6dbb1fa5b7956309a02dd55b9995643b4ba9a588ac00000000
+// res4: String = 0200000001f3f3bf3ee577165d3b849ff5ba930d1b5086ae0e4f3dd7ba7f9c99d0dba669cc000000006a47304402206eeda5ce464051e1b83735bf4c7e5756bc4535e24eba0a480c4cf7a53632b81d022051d9c074ab5a8e745bdf17c0f4f46642e5944f54a2b65c7de6e7d3d98e4400880121026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7000000000288130000000000001976a91407d2e97945fe5869ec1bb1eda76816d96bfe6a5388aca7120000000000001976a914879b0d029890bdcab28006f929e21268f88c408588ac00000000
 
Edit

TxBuilder Example

Bitcoin-S features a transaction building API that allows you to construct and sign Bitcoin transactions. Here's an example of how to use it

implicit val ec: ExecutionContext = ExecutionContext.Implicits.global
-// ec: ExecutionContext = scala.concurrent.impl.ExecutionContextImpl$$anon$3@10698e48[Running, parallelism = 2, size = 2, active = 0, running = 0, steals = 35, tasks = 0, submissions = 0]
+// ec: ExecutionContext = scala.concurrent.impl.ExecutionContextImpl$$anon$3@62d742de[Running, parallelism = 2, size = 2, active = 0, running = 0, steals = 33, tasks = 0, submissions = 0]
 
 // Initialize a transaction builder
 val builder = RawTxBuilder()
@@ -74,19 +74,19 @@
 val privKey = ECPrivateKey.freshPrivateKey
 // privKey: ECPrivateKey = Masked(ECPrivateKeyImpl)
 val pubKey = privKey.publicKey
-// pubKey: ECPublicKey = ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f)
+// pubKey: ECPublicKey = ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7)
 
 // this is the script that the TxBuilder is going to create a
 // script signature that validly spends this scriptPubKey
 val creditingSpk = P2PKHScriptPubKey(pubKey = privKey.publicKey)
-// creditingSpk: P2PKHScriptPubKey = pkh(c543241c8638626fd9dd10b02f5134931ae55a40)
+// creditingSpk: P2PKHScriptPubKey = pkh(6f6f10668300bf1eb11e9e3fb96fe98d379b8902)
 val amount = 10000.satoshis
 // amount: Satoshis = 10000 sats
 
 // this is the UTXO we are going to be spending
 val utxo =
   TransactionOutput(value = amount, scriptPubKey = creditingSpk)
-// utxo: TransactionOutput = TransactionOutput(10000 sats,pkh(c543241c8638626fd9dd10b02f5134931ae55a40))
+// utxo: TransactionOutput = TransactionOutput(10000 sats,pkh(6f6f10668300bf1eb11e9e3fb96fe98d379b8902))
 
 // the private key that locks the funds for the script we are spending too
 val destinationPrivKey = ECPrivateKey.freshPrivateKey
@@ -99,7 +99,7 @@
 // the script that corresponds to destination private key, this is what is receiving the money
 val destinationSPK =
   P2PKHScriptPubKey(pubKey = destinationPrivKey.publicKey)
-// destinationSPK: P2PKHScriptPubKey = pkh(eb819298c42075280d11b426a16061f00ecdf713)
+// destinationSPK: P2PKHScriptPubKey = pkh(07d2e97945fe5869ec1bb1eda76816d96bfe6a53)
 
 // this is where we are sending money too
 // we could add more destinations here if we
@@ -110,7 +110,7 @@
 
     Vector(destination0)
 }
-// destinations: Vector[TransactionOutput] = Vector(TransactionOutput(5000 sats,pkh(eb819298c42075280d11b426a16061f00ecdf713)))
+// destinations: Vector[TransactionOutput] = Vector(TransactionOutput(5000 sats,pkh(07d2e97945fe5869ec1bb1eda76816d96bfe6a53)))
 
 // Add the destinations to the tx builder
 builder ++= destinations
@@ -123,17 +123,17 @@ builder ++= destinations
                                   inputs = Vector.empty,
                                   outputs = Vector(utxo),
                                   lockTime = UInt32.zero)
-// creditingTx: BaseTransaction = BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(c543241c8638626fd9dd10b02f5134931ae55a40))),UInt32Impl(0))
+// creditingTx: BaseTransaction = BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(6f6f10668300bf1eb11e9e3fb96fe98d379b8902))),UInt32Impl(0))
 
 // this is the information we need from the crediting TX
 // to properly "link" it in the transaction we are creating
 val outPoint = TransactionOutPoint(creditingTx.txId, UInt32.zero)
-// outPoint: TransactionOutPoint = TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0)
+// outPoint: TransactionOutPoint = TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0)
 val input = TransactionInput(
     outPoint,
     EmptyScriptSignature,
     sequenceNumber = UInt32.zero)
-// input: TransactionInput = TransactionInputImpl(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),EmptyScriptSignature,UInt32Impl(0))
+// input: TransactionInput = TransactionInputImpl(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),EmptyScriptSignature,UInt32Impl(0))
 
 // Add a new input to our builder
 builder += input
@@ -141,11 +141,11 @@ builder += input
 
 // We can now generate a RawTxBuilderResult ready to be finalized
 val builderResult = builder.result()
-// builderResult: RawTxBuilderResult = RawTxBuilderResult(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),EmptyScriptSignature,UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(eb819298c42075280d11b426a16061f00ecdf713))),UInt32Impl(0))
+// builderResult: RawTxBuilderResult = RawTxBuilderResult(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),EmptyScriptSignature,UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(07d2e97945fe5869ec1bb1eda76816d96bfe6a53))),UInt32Impl(0))
 
 // this contains the information needed to analyze our input during finalization
 val inputInfo = P2PKHInputInfo(outPoint, amount, privKey.publicKey)
-// inputInfo: P2PKHInputInfo = P2PKHInputInfo(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),10000 sats,ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f))
+// inputInfo: P2PKHInputInfo = P2PKHInputInfo(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),10000 sats,ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7))
 
 // this is how much we are going to pay as a fee to the network
 // for this example, we are going to pay 1 satoshi per byte
@@ -155,18 +155,18 @@ builder += input
 val changePrivKey = ECPrivateKey.freshPrivateKey
 // changePrivKey: ECPrivateKey = Masked(ECPrivateKeyImpl)
 val changeSPK = P2PKHScriptPubKey(pubKey = changePrivKey.publicKey)
-// changeSPK: P2PKHScriptPubKey = pkh(1e6dbb1fa5b7956309a02dd55b9995643b4ba9a5)
+// changeSPK: P2PKHScriptPubKey = pkh(879b0d029890bdcab28006f929e21268f88c4085)
 
 // We chose a finalizer that adds a change output to our tx based on a fee rate
 val finalizer = StandardNonInteractiveFinalizer(
     Vector(inputInfo),
     feeRate,
     changeSPK)
-// finalizer: StandardNonInteractiveFinalizer = StandardNonInteractiveFinalizer(Vector(P2PKHInputInfo(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),10000 sats,ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f))),1 sats/byte,pkh(1e6dbb1fa5b7956309a02dd55b9995643b4ba9a5))
+// finalizer: StandardNonInteractiveFinalizer = StandardNonInteractiveFinalizer(Vector(P2PKHInputInfo(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),10000 sats,ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7))),1 sats/byte,pkh(879b0d029890bdcab28006f929e21268f88c4085))
 
 // We can now finalize the tx builder result from earlier with this finalizer
 val unsignedTxF: Future[Transaction] = finalizer.buildTx(builderResult)
-// unsignedTxF: Future[Transaction] = Future(Success(BaseTransaction(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),EmptyScriptSignature,UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(eb819298c42075280d11b426a16061f00ecdf713)), TransactionOutput(4775 sats,pkh(1e6dbb1fa5b7956309a02dd55b9995643b4ba9a5))),UInt32Impl(0))))
+// unsignedTxF: Future[Transaction] = Future(Success(BaseTransaction(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),EmptyScriptSignature,UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(07d2e97945fe5869ec1bb1eda76816d96bfe6a53)), TransactionOutput(4775 sats,pkh(879b0d029890bdcab28006f929e21268f88c4085))),UInt32Impl(0))))
 
 // We now turn to signing the unsigned transaction
 // this contains all the information we need to
@@ -176,12 +176,12 @@ builder += input
                                      signers = Vector(privKey),
                                      hashType =
                                          HashType.sigHashAll)
-// utxoInfo: ScriptSignatureParams[P2PKHInputInfo] = ScriptSignatureParams(P2PKHInputInfo(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),10000 sats,ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f)),BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(c543241c8638626fd9dd10b02f5134931ae55a40))),UInt32Impl(0)),Vector(Masked(ECPrivateKeyImpl)),SIGHASH_ALL(Int32Impl(1)))
+// utxoInfo: ScriptSignatureParams[P2PKHInputInfo] = ScriptSignatureParams(P2PKHInputInfo(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),10000 sats,ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7)),BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(6f6f10668300bf1eb11e9e3fb96fe98d379b8902))),UInt32Impl(0)),Vector(Masked(ECPrivateKeyImpl)),SIGHASH_ALL(Int32Impl(1)))
 
 // all of the UTXO spending information, since we only have
 // one input, this is just one element
 val utxoInfos: Vector[ScriptSignatureParams[InputInfo]] = Vector(utxoInfo)
-// utxoInfos: Vector[ScriptSignatureParams[InputInfo]] = Vector(ScriptSignatureParams(P2PKHInputInfo(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),10000 sats,ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f)),BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(c543241c8638626fd9dd10b02f5134931ae55a40))),UInt32Impl(0)),Vector(Masked(ECPrivateKeyImpl)),SIGHASH_ALL(Int32Impl(1))))
+// utxoInfos: Vector[ScriptSignatureParams[InputInfo]] = Vector(ScriptSignatureParams(P2PKHInputInfo(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),10000 sats,ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7)),BaseTransaction(Int32Impl(1),Vector(),Vector(TransactionOutput(10000 sats,pkh(6f6f10668300bf1eb11e9e3fb96fe98d379b8902))),UInt32Impl(0)),Vector(Masked(ECPrivateKeyImpl)),SIGHASH_ALL(Int32Impl(1))))
 
 // Yay! Now we use the RawTxSigner object to sign the tx.
 // The 'sign' method is going produce a validly signed transaction
@@ -201,7 +201,7 @@ builder += input
   }
   Await.result(signedTxF, 30.seconds)
 }
-// signedTx: Transaction = BaseTransaction(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(18355e9fce47f060ee592ab6d42c6e5e46107faea620c22a670c547803a478cc:0),P2PKHScriptSignature(ECPublicKey(03b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f), ECDigitalSignature(3044022061a7e63c6e5c864558c11b8782aa0ca43337132935d2951dd13670a8bdfe77b902207388b8a0bf0caacd2aed9caa2bb2e760810b619ee641da75154c3b76e34d336601)),UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(eb819298c42075280d11b426a16061f00ecdf713)), TransactionOutput(4775 sats,pkh(1e6dbb1fa5b7956309a02dd55b9995643b4ba9a5))),UInt32Impl(0))
+// signedTx: Transaction = BaseTransaction(Int32Impl(2),Vector(TransactionInputImpl(TransactionOutPoint(cc69a6dbd0999c7fbad73d4f0eae86501b0d93baf59f843b5d1677e53ebff3f3:0),P2PKHScriptSignature(ECPublicKey(026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7), ECDigitalSignature(304402206eeda5ce464051e1b83735bf4c7e5756bc4535e24eba0a480c4cf7a53632b81d022051d9c074ab5a8e745bdf17c0f4f46642e5944f54a2b65c7de6e7d3d98e44008801)),UInt32Impl(0))),Vector(TransactionOutput(5000 sats,pkh(07d2e97945fe5869ec1bb1eda76816d96bfe6a53)), TransactionOutput(4775 sats,pkh(879b0d029890bdcab28006f929e21268f88c4085))),UInt32Impl(0))
 
signedTx.inputs.length
 // res2: Int = 1
@@ -211,7 +211,7 @@ signedTx.outputs.length
 
 //remember, you can call .hex on any bitcoin-s data structure to get the hex representation!
 signedTx.hex
-// res4: String = 0200000001cc78a40378540c672ac220a6ae7f10465e6e2cd4b62a59ee60f047ce9f5e3518000000006a473044022061a7e63c6e5c864558c11b8782aa0ca43337132935d2951dd13670a8bdfe77b902207388b8a0bf0caacd2aed9caa2bb2e760810b619ee641da75154c3b76e34d3366012103b80ea4976f70479b0a822416955fbabeee3bff3ae6dc7e787231265eed4cca4f000000000288130000000000001976a914eb819298c42075280d11b426a16061f00ecdf71388aca7120000000000001976a9141e6dbb1fa5b7956309a02dd55b9995643b4ba9a588ac00000000
+// res4: String = 0200000001f3f3bf3ee577165d3b849ff5ba930d1b5086ae0e4f3dd7ba7f9c99d0dba669cc000000006a47304402206eeda5ce464051e1b83735bf4c7e5756bc4535e24eba0a480c4cf7a53632b81d022051d9c074ab5a8e745bdf17c0f4f46642e5944f54a2b65c7de6e7d3d98e4400880121026dc7fffe2ad7863dcbf3834853cf1c88ab9b762ce208f8fa37cdd9b2d61948f7000000000288130000000000001976a91407d2e97945fe5869ec1bb1eda76816d96bfe6a5388aca7120000000000001976a914879b0d029890bdcab28006f929e21268f88c408588ac00000000