diff --git a/.gitignore b/.gitignore index e2dc9d5..511e251 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ libbdkffi.dylib src/bdkpython/bdk.py *.whl build/ + +testing-setup-py-simple-example.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 0456cf7..dad65c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,16 +10,14 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic - Community related files (bug report, feature request, and pull request templates) - Changelog - MIT and Apache 2.0 licenses -- Update BDK to version 0.18.0 -- Add BumpFeeTxBuilder to bump the fee on an unconfirmed tx created by the Wallet -- Change TxBuilder.build() to TxBuilder.finish() to align with bdk function name -- Fix Wallet.broadcast function, now returns a tx id as a hex string -- Remove creating a new spending Transaction via the PartiallySignedBitcoinTransaction constructor -- Add TxBuilder for creating new spending PartiallySignedBitcoinTransaction -- Add TxBuilder .add_recipient, .fee_rate, and .build functions -- Add TxBuilder .drain_wallet and .drain_to functions +- Update BDK to version `0.19.0` +- Add `BumpFeeTxBuilder` to bump the fee on an unconfirmed tx created by the Wallet +- Add `Blockchain.broadcast` function (does not return anything) +- Add TxBuilder for creating new spending `PartiallySignedBitcoinTransaction` +- Add TxBuilder `add_recipient`, `fee_rate`, and `finish` functions +- Add TxBuilder `drain_wallet` and `drain_to` functions - Update generate cli tool to generate all binding languages and rename to bdk-ffi-bindgen -- Add sqlite database support +- Add sqlite database support - Fix memory database configuration enum, remove junk field - Remove hard coded sync progress value (was always returning 21.0) diff --git a/README.md b/README.md index 0e258a1..96ad34b 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ pip3 install --requirement requirements.txt bash ./generate.sh python3 setup.py --verbose bdist_wheel pip3 install ./dist/bdkpython--py3-none-any.whl -python -m unittest --verbose tests/test_bdk.py +python -m unittest --verbose tests/test_bdk.py ```
diff --git a/bdk-ffi b/bdk-ffi index 30e54ac..80ed21e 160000 --- a/bdk-ffi +++ b/bdk-ffi @@ -1 +1 @@ -Subproject commit 30e54ac067f68e8c22d652837b4d5901c12e3384 +Subproject commit 80ed21e4c9e61d6224e074258229a4d6da6cc049 diff --git a/setup.py b/setup.py index b2a68b1..fe9e568 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ from setuptools import setup from setuptools_rust import Binding, RustExtension LONG_DESCRIPTION = """# bdkpython -The Python language bindings for the [bitcoindevkit](https://github.com/bitcoindevkit). +The Python language bindings for the [Bitcoin Dev Kit](https://github.com/bitcoindevkit). ## Install the package ```shell @@ -39,8 +39,10 @@ wallet = bdk.Wallet( ) # print new receive address -address = wallet.get_new_address() -print(f"New BIP84 testnet address: {address}") +address_info = wallet.get_address(bdk.AddressIndex.LAST_UNUSED) +address = address_info.address +index = address_info.index +print(f"New BIP84 testnet address: {address} at index {index}") # print wallet balance @@ -57,8 +59,8 @@ rust_ext = RustExtension( setup( name='bdkpython', - version = '0.1.0.dev', - description="The Python language bindings for the bitcoindevkit", + version='0.1.0.dev', + description="The Python language bindings for the Bitcoin Dev Kit", long_description=LONG_DESCRIPTION, long_description_content_type='text/markdown', rust_extensions=[rust_ext], diff --git a/tests/test_bdk.py b/tests/test_bdk.py index c43e2ac..b667b30 100644 --- a/tests/test_bdk.py +++ b/tests/test_bdk.py @@ -24,7 +24,8 @@ class TestSimpleBip84Wallet(unittest.TestCase): network=bdk.Network.TESTNET, database_config=db_config ) - address = wallet.get_new_address() + address_info = wallet.get_address(bdk.AddressIndex.LAST_UNUSED) + address = address_info.address # print(f"New address is {address}") assert address == "tb1qzg4mckdh50nwdm9hkzq06528rsu73hjxxzem3e", f"Wrong address {address}, should be tb1qzg4mckdh50nwdm9hkzq06528rsu73hjxxzem3e"