Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.jonasbits:bitcoinj-bip44-extension:'
}
dependencies {
implementation("com.github.jonasbits:bitcoinj-bip44-extension:")
}
<dependency>
<groupId>com.github.jonasbits</groupId>
<artifactId>bitcoinj-bip44-extension</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.jonasbits" % "bitcoinj-bip44-extension" % ""
:dependencies [[com.github.jonasbits/bitcoinj-bip44-extension ""]]
BIP44 extension of Bitcoinj. Includes full support for BIP39 including non-English word lists.
Install Maven 3.2 or higher.
mvn clean
mvn package
Two .jar files will be created in the directory ./target :
BitcoinjBIP44.jar : Can be included in any Java project 'as is' but requires inclusion of dependencies. Main.java harness not included.
BitcoinjBIP44-jar-with-dependencies.jar : includes all dependencies and can be run from the command line using the Main.java harness (see command line switches below).
java -jar target/BitcoinjBIP44-jar-with-dependencies.jar
-a create/restore with this number of accounts (default = 2 accounts)
-c (no arguments) create new wallet (default = 12 words)
-f restore wallet from JSON using this password
-l use this Locale for BIP 39 nword list, defaults to en_US if Locale empty or incorrect (accepted Locales: en_US, es_ES, fr_FR, jp_JP, zh_CN, zh_TW)
-p use this passphrase (BIP 39)
-r restore wallet from hex, mnemonic, or ':' separated XPUBs (write-only wallet)
-t save wallet to JSON using this password
-w create wallet using this number of words for mnemonic (defaults to 12 words if supplied number is illegal)