Skip to content

Commit a421d16

Browse files
docs: update readmes
1 parent 749c62f commit a421d16

File tree

5 files changed

+44
-16
lines changed

5 files changed

+44
-16
lines changed

README.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Native language bindings for BDK
1+
# Language bindings for BDK
22

33
<p>
44
<a href="https://github.com/bitcoindevkit/bdk-ffi/blob/master/LICENSE"><img alt="MIT or Apache-2.0 Licensed" src="https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg"/></a>
@@ -8,22 +8,25 @@
88
</p>
99

1010
## Readme
11+
1112
The workspace in this repository creates the `libbdkffi` multi-language library for the Rust-based
1213
[bdk] library from the [Bitcoin Dev Kit] project.
1314

1415
Each supported language and the platform(s) it's packaged for has its own directory. The Rust code in this project is in the bdk-ffi directory and is a wrapper around the [bdk] library to expose its APIs in a uniform way using the [mozilla/uniffi-rs] bindings generator for each supported target language.
1516

1617
## Supported target languages and platforms
18+
1719
The below directories (a separate repository in the case of bdk-swift) include instructions for using, building, and publishing the native language binding for [bdk] supported by this project.
1820

1921
| Language | Platform | Published Package | Building Documentation | API Docs |
20-
| -------- |-----------------------|-------------|------------------------|-----------------------|
21-
| Kotlin | JVM | [bdk-jvm] | [Readme bdk-jvm] | [Kotlin JVM API Docs] |
22-
| Kotlin | Android | [bdk-android] | [Readme bdk-android] | [Android API Docs] |
23-
| Swift | iOS, macOS | [bdk-swift] | [Readme bdk-swift] | |
24-
| Python | linux, macOS, Windows | [bdk-python] | [Readme bdk-python] | |
22+
| -------- |-----------------------|-------------------|------------------------|-----------------------|
23+
| Kotlin | JVM | [bdk-jvm] | [Readme bdk-jvm] | [Kotlin JVM API Docs] |
24+
| Kotlin | Android | [bdk-android] | [Readme bdk-android] | [Android API Docs] |
25+
| Swift | iOS, macOS | [bdk-swift] | [Readme bdk-swift] | |
26+
| Python | linux, macOS, Windows | [bdk-python] | [Readme bdk-python] | |
27+
28+
## Building and testing the libraries
2529

26-
## Building and Testing the Libraries
2730
If you are familiar with the build tools for the specific languages you wish to build the libraries for, you can use their normal build/test workflows. We also include some [just](https://just.systems/) files to simplify the work across different languages. If you have the just tool installed on your system, you can simply call the commands defined in the `justfile`s, for example:
2831
```sh
2932
cd bdk-android
@@ -34,20 +37,25 @@ just publishlocal
3437
```
3538

3639
## Minimum Supported Rust Version (MSRV)
40+
3741
This library should compile with any combination of features with Rust 1.84.1.
3842

3943
## Contributing
44+
4045
To add new structs and functions, see the [UniFFI User Guide](https://mozilla.github.io/uniffi-rs/) and the [uniffi-examples](https://thunderbiscuit.github.io/uniffi-examples/) repository.
4146

4247
## Goals
48+
4349
1. Language bindings should feel idiomatic in target languages/platforms
4450
2. Adding new targets should be easy
4551
3. Getting up and running should be easy
4652
4. Contributing should be easy
4753
5. Get it right, then automate
4854

4955
## Using the libraries
56+
5057
### bdk-android
58+
5159
```kotlin
5260
// build.gradle.kts
5361
repositories {
@@ -59,6 +67,7 @@ dependencies {
5967
```
6068

6169
### bdk-jvm
70+
6271
```kotlin
6372
// build.gradle.kts
6473
repositories {
@@ -71,18 +80,22 @@ dependencies {
7180

7281
_Note:_ We also publish snapshot versions of bdk-jvm and bdk-android. See the specific readmes for instructions on how to use those.
7382

74-
### bdk-python
83+
### bdkpython
84+
7585
```shell
7686
pip3 install bdkpython
7787
```
7888

79-
### bdk-swift
80-
Add bdk-swift to your dependencies in XCode.
89+
### BitcoinDevKit (Swift)
90+
91+
Add `BitcoinDevKit` to your dependencies in XCode.
8192

8293
## Developing language bindings using uniffi-rs
94+
8395
If you are interested in better understanding the base structure we use here in order to build your own Rust-to-Kotlin/Swift/Python language bindings, check out the [uniffi-bindings-template](https://github.com/thunderbiscuit/uniffi-bindings-template) repository. We maintain it as an example and starting point for other projects that wish to leverage the tech stack used in producing the BDK language bindings.
8496

8597
## Verifying Signatures
98+
8699
Both libraries and all their corresponding artifacts are signed with a PGP key you can find in the
87100
root of this repository. To verify the signatures follow the below steps:
88101

@@ -121,12 +134,14 @@ gpg: Good signature from "bitcoindevkit-bindings <[email protected]>" [
121134
```
122135

123136
### PGP Metadata
137+
124138
Full key ID: `88AD 93AC 4589 FD09 0FF3 B8D1 2768 C43E 8803 C6A3`
125139
Fingerprint: `2768C43E8803C6A3`
126140
Name: `bitcoindevkit-bindings`
127141
128142

129143
## Thanks
144+
130145
This project is made possible thanks to the wonderful work by the [mozilla/uniffi-rs] team.
131146

132147
[Kotlin]: https://kotlinlang.org/

bdk-android/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ _Note that Kotlin version `2.1.10` or later is required to build the library._
4343
git clone https://github.com/bitcoindevkit/bdk-ffi
4444
```
4545
2. Install Android SDK and Build-Tools for API level 30+
46-
3. Setup `ANDROID_SDK_ROOT` and `ANDROID_NDK_ROOT` path variables which are required by the build tool. Note that currently, NDK version 25.2.9519653 or above is required. For example:
46+
3. Setup `ANDROID_SDK_ROOT` and `ANDROID_NDK_ROOT` path variables which are required by the build tool. Note that currently, NDK version 27.2.12479018 or above is recommended. For example:
4747
```shell
4848
# macOS
4949
export ANDROID_SDK_ROOT=~/Library/Android/sdk
50-
export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/25.2.9519653
50+
export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/27.2.12479018
5151

5252
# Linux
5353
export ANDROID_SDK_ROOT=/usr/local/lib/android/sdk
54-
export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/25.2.9519653
54+
export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/27.2.12479018
5555
```
5656
4. Build Kotlin bindings
5757
```sh

bdk-jvm/README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,23 @@
33
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.
44

55
## How to Use
6+
67
To use the Kotlin language bindings for BDK in your JVM project add the following to your gradle dependencies:
8+
79
```kotlin
810
repositories {
911
mavenCentral()
1012
}
1113

1214
dependencies {
13-
implementation("org.bitcoindevkit:bdk-jvm:<version>")
15+
implementation("org.bitcoindevkit:bdk-jvm:<version>")
1416
}
1517
```
1618

1719
### Snapshot releases
20+
1821
To use a snapshot release, specify the snapshot repository url in the `repositories` block and use the snapshot version in the `dependencies` block:
22+
1923
```kotlin
2024
repositories {
2125
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
@@ -27,9 +31,12 @@ dependencies {
2731
```
2832

2933
## Example Projects
30-
* [Tatooine Faucet](https://github.com/thunderbiscuit/tatooine)
34+
35+
- [Tatooine Faucet](https://github.com/thunderbiscuit/tatooine)
36+
- [Godzilla Wallet](https://github.com/thunderbiscuit/godzilla-wallet)
3137

3238
## How to build
39+
3340
_Note that Kotlin version `1.9.23` or later is required to build the library._
3441
1. Install JDK 17. For example, with SDKMAN!:
3542
```shell
@@ -43,24 +50,29 @@ bash ./scripts/build-<your-local-architecture>.sh
4350
```
4451

4552
## How to publish to your local Maven repo
53+
4654
```shell
4755
cd bdk-jvm
4856
./gradlew publishToMavenLocal -P localBuild
4957
```
5058

5159
Note that the commands assume you don't need the local libraries to be signed. If you do wish to sign them, simply set your `~/.gradle/gradle.properties` signing key values like so:
60+
5261
```properties
5362
signing.gnupg.keyName=<YOUR_GNUPG_ID>
5463
signing.gnupg.passphrase=<YOUR_GNUPG_PASSPHRASE>
5564
```
5665

5766
and use the `publishToMavenLocal` task without the `localBuild` flag:
67+
5868
```shell
5969
./gradlew publishToMavenLocal
6070
```
6171

6272
## Known issues
73+
6374
## JNA dependency
75+
6476
Depending on the JVM version you use, you might not have the JNA dependency on your classpath. The exception thrown will be
6577
```shell
6678
class file for com.sun.jna.Pointer not found

bdk-python/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ See the [package on PyPI](https://pypi.org/project/bdkpython/).
77
## Install from PyPI
88

99
Install the latest release using
10+
1011
```shell
1112
pip install bdkpython
1213
```

bdk-swift/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ swift test
3535

3636
### Example Projects
3737

38-
* [BDKSwiftExampleWallet](https://github.com/bitcoindevkit/BDKSwiftExampleWallet), iOS
38+
- [BDKSwiftExampleWallet](https://github.com/bitcoindevkit/BDKSwiftExampleWallet), iOS
3939

4040
## How to Build and Publish
4141

0 commit comments

Comments
 (0)