diff --git a/examples/src/main/java/org/bitcoinj/examples/DoubleSpend.java b/examples/src/main/java/org/bitcoinj/examples/DoubleSpend.java index 4ec94995f..d073d39a6 100644 --- a/examples/src/main/java/org/bitcoinj/examples/DoubleSpend.java +++ b/examples/src/main/java/org/bitcoinj/examples/DoubleSpend.java @@ -20,8 +20,10 @@ import org.bitcoinj.core.listeners.PreMessageReceivedEventListener; import org.bitcoinj.core.*; import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.script.Script; import org.bitcoinj.utils.BriefLogFormatter; import org.bitcoinj.utils.Threading; +import org.bitcoinj.wallet.KeyChainGroupStructure; import org.bitcoinj.wallet.Wallet; import java.io.File; @@ -37,7 +39,7 @@ public class DoubleSpend { public static void main(String[] args) throws Exception { BriefLogFormatter.init(); final RegTestParams params = RegTestParams.get(); - WalletAppKit kit = new WalletAppKit(params, new File("."), "doublespend"); + WalletAppKit kit = new WalletAppKit(params, Script.ScriptType.P2WPKH, KeyChainGroupStructure.BIP32, new File("."), "doublespend"); kit.connectToLocalHost(); kit.setAutoSave(false); kit.startAsync(); diff --git a/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java b/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java index da66be03f..a7d71123c 100644 --- a/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java +++ b/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java @@ -29,7 +29,9 @@ import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.params.MainNetParams; import org.bitcoinj.params.RegTestParams; import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.script.Script; import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.wallet.KeyChainGroupStructure; import org.bitcoinj.wallet.SendRequest; import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.listeners.WalletCoinsReceivedEventListener; @@ -78,7 +80,7 @@ public class ForwardingService { System.out.println("Forwarding address: " + forwardingAddress); // Start up a basic app using a class that automates some boilerplate. - kit = new WalletAppKit(params, new File("."), filePrefix); + kit = new WalletAppKit(params, Script.ScriptType.P2WPKH, KeyChainGroupStructure.BIP32, new File("."), filePrefix); if (params == RegTestParams.get()) { // Regression test mode is designed for testing and development only, so there's no public network for it. diff --git a/examples/src/main/java/org/bitcoinj/examples/Kit.java b/examples/src/main/java/org/bitcoinj/examples/Kit.java index 0cb855fa7..89c6c43b3 100644 --- a/examples/src/main/java/org/bitcoinj/examples/Kit.java +++ b/examples/src/main/java/org/bitcoinj/examples/Kit.java @@ -20,6 +20,7 @@ import org.bitcoinj.core.*; import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.params.TestNet3Params; import org.bitcoinj.script.Script; +import org.bitcoinj.wallet.KeyChainGroupStructure; import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.listeners.KeyChainEventListener; import org.bitcoinj.wallet.listeners.ScriptsChangeEventListener; @@ -55,7 +56,7 @@ public class Kit { // Now we initialize a new WalletAppKit. The kit handles all the boilerplate for us and is the easiest way to get everything up and running. // Have a look at the WalletAppKit documentation and its source to understand what's happening behind the scenes: https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java - WalletAppKit kit = new WalletAppKit(params, new File("."), "walletappkit-example"); + WalletAppKit kit = new WalletAppKit(params, Script.ScriptType.P2WPKH, KeyChainGroupStructure.BIP32, new File("."), "walletappkit-example"); // In case you want to connect with your local bitcoind tell the kit to connect to localhost. // You must do that in reg test mode. diff --git a/examples/src/main/java/org/bitcoinj/examples/SendRequest.java b/examples/src/main/java/org/bitcoinj/examples/SendRequest.java index c5eef1e63..0744b6701 100644 --- a/examples/src/main/java/org/bitcoinj/examples/SendRequest.java +++ b/examples/src/main/java/org/bitcoinj/examples/SendRequest.java @@ -19,6 +19,8 @@ package org.bitcoinj.examples; import org.bitcoinj.core.*; import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.script.Script; +import org.bitcoinj.wallet.KeyChainGroupStructure; import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.Wallet.BalanceType; @@ -34,7 +36,7 @@ public class SendRequest { // We use the WalletAppKit that handles all the boilerplate for us. Have a look at the Kit.java example for more details. NetworkParameters params = TestNet3Params.get(); - WalletAppKit kit = new WalletAppKit(params, new File("."), "sendrequest-example"); + WalletAppKit kit = new WalletAppKit(params, Script.ScriptType.P2WPKH, KeyChainGroupStructure.BIP32, new File("."), "sendrequest-example"); kit.startAsync(); kit.awaitRunning(); diff --git a/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java b/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java index b1e9f75b4..a9598d4ef 100644 --- a/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java +++ b/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java @@ -21,7 +21,9 @@ import org.bitcoinj.core.listeners.PeerConnectedEventListener; import org.bitcoinj.core.listeners.PeerDisconnectedEventListener; import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.script.Script; import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.wallet.KeyChainGroupStructure; import org.bitcoinj.wallet.SendRequest; import org.bitcoinj.wallet.Wallet; @@ -47,7 +49,7 @@ public class TestFeeLevel { Coin feeRateToTest = Coin.valueOf(Long.parseLong(args[0])); System.out.println("Fee rate to test is " + feeRateToTest.toFriendlyString() + "/kB"); - kit = new WalletAppKit(PARAMS, new File("."), "testfeelevel"); + kit = new WalletAppKit(PARAMS, Script.ScriptType.P2WPKH, KeyChainGroupStructure.BIP32, new File("."), "testfeelevel"); kit.startAsync(); kit.awaitRunning(); try {