bitcoindevkit / bdk-python Goto Github PK
View Code? Open in Web Editor NEWThe Python language bindings for the Bitcoindevkit
License: Other
The Python language bindings for the Bitcoindevkit
License: Other
This new version will bring in callbacks for the Python bindings.
Hi There,
I am currently trying to run the below code:
import bdkpython as bdk
descriptor = "wpkh(tprv8ZgxMBicQKsPcx5nBGsR63Pe8KnRUqmbJNENAfGftF3yuXoMMoVJJcYeUw5eVkm9WBPjWYt6HMWYJNesB5HaNVBaFc1M6dRjWSYnmewUMYy/84h/1h/0h/0/*)"
config = bdk.DatabaseConfig.MEMORY("")
wallet = bdk.OfflineWallet(descriptor, bdk.Network.TESTNET, config)
address = wallet.get_new_address()
print(f"New BIP84 testnet address: {address}")
And getting this error:
Traceback (most recent call last):
File "/Users/praveen/Documents/code/sandbox/bitcoinprograms/bdkpython.py", line 1, in <module>
import bdkpython as bdk
File "/Users/praveen/Documents/code/sandbox/bitcoinprograms/bdkpython.py", line 4, in <module>
config = bdk.DatabaseConfig.MEMORY("")
AttributeError: partially initialized module 'bdkpython' has no attribute 'DatabaseConfig' (most likely due to a circular import)
Do you think I am making some mistake here or there is something incorrect in the code I have written?
Thanks
After searching a bit, apparently realpath
doesn't work inside scripts? Not sure why this is not throwing off the script; the wheel built fine on my end and my tests also worked.
generate.sh: line 5: zsh: command not found: realpath
It's failing yet still storing the right variable inside SCRIPT_DIR:
bdk-python on master [$!] via ๐
โฏ SCRIPT_DIR=$(dirname "$(realpath $0)")
zsh: command not found: realpath
bdk-python on master [$!] via ๐
โฏ echo $SCRIPT_DIR
.
Documenting some issues here.
A current wheel name example for macOS is bdkpython-0.0.5-cp38-cp38-macosx_11_0_universal2.whl
.
I have access to a mac with macOS version 10.15 (x86_64) and when I attempt to install the wheel from PyPI, I get the message that pip could not find a version that satisfies the requirement.
When I download the wheel manually and change its name to bdkpython-0.0.5-cp38-cp38-macosx_10_15_universal2.whl
, pip installs it correctly. One of the issues I have at the moment is I don't know the way to name it in such a way as to declare it more "general", say something like "any macOS 10+". The name needs to match exactly my version of the OS macosx_10_15
otherwise pip returns bdkpython-0.0.5-cp39... is not a supported wheel on this platform
.
I do not get this error when installing on macOS 12.2 funny enough.
The issues I am facing with regards to each of the above images pasted above are:
bash generate.sh
generate.sh: line 2: $'\r': command not found
: invalid option nameset: pipefail
Device Specifications :
Processor Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz 2.40 GHz
Installed RAM 8.00 GB (7.84 GB usable)
System type 64-bit operating system, x64-based processor
Windows Specifications :
Edition Windows 11 Home Single Language
Version 21H2
OS build 22000.527
Experience Windows Feature Experience Pack 1000.22000.527.0
Update 1 : python -m tox
is already broken so that can be overlooked in the above images as of now. We as team will fix it!
Update 2 : python3
was not present therefore ran it with just python
python setup.py -v bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
My tests with the new proposed Nakamoto client have been successful. Opening this issue to keep track of the progress of the new CBF client in BDK.
I have managed to get testers for all 3 platforms and the library (mostly) works. Still some issues on macOS, but we can work on those as we go.
@notmandatory if you think it's ready, I'm happy to transfer ownership of the repo to the bitcoindevkit org.
The command python -m tox
is now broken because of the following error:
ModuleNotFoundError: No module named 'setuptools_rust'
It's currently pointing to my personal repo of bdk-python.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.