# bdk-jvm This project builds a .jar package for the JVM platform that provides Kotlin language bindings for the [BDK] libraries. The Kotlin language bindings are created by the [`bdk-ffi`] project which is included in the root of this repository. ## How to Use To use the Kotlin language bindings for BDK in your JVM project, add the following to your Gradle dependencies: ```kotlin repositories { mavenCentral() } dependencies { implementation("org.bitcoindevkit:bdk-jvm:") } ``` ## API Documentation You can view the latest API documentation here: [bdk-jvm ](https://javadoc.io/doc/org.bitcoindevkit/bdk-jvm/latest/index.html) ## Example Projects - [Tatooine Faucet](https://github.com/thunderbiscuit/tatooine) - [Godzilla Wallet](https://github.com/thunderbiscuit/godzilla-wallet) ## How to build _Note that Kotlin version `1.9.23` or later is required to build the library._ 1. Install JDK 17. For example, with SDKMAN!: ```shell curl -s "https://get.sdkman.io" | bash source "$HOME/.sdkman/bin/sdkman-init.sh" sdk install java 17.0.2-tem ``` 2. Build kotlin bindings ```sh bash ./scripts/build-.sh ``` ## Run example files The `examples` module show different samples of how some of the APIs can be used. You can run the examples after building as stated above. The gradle task to run is by convention the file name of the example file. ```shell ./gradlew MultisigTransaction ``` You can also list the application tasks. (All examples grouped under application) ```shell ./gradlew tasks --group application ``` ## Publish to your local Maven repo ```shell ./gradlew publishToMavenLocal -P skipSigning ``` ## Known issues ## JNA dependency Depending on the JVM version you use, you might not have the JNA dependency on your classpath. The exception thrown will be ```shell class file for com.sun.jna.Pointer not found ``` The solution is to add JNA as a dependency like so: ```kotlin dependencies { // ... implementation("net.java.dev.jna:jna:5.12.1") } ``` [BDK]: https://github.com/bitcoindevkit/ [`bdk-ffi`]: https://github.com/bitcoindevkit/bdk-ffi