High Performance Blockchain Deserializer
Reason this release was yanked:
bug
Project description
bitcoin-explorer
bitcoin_explorer
is an efficient library for reading
bitcoin-core binary blockchain file as a database (utilising multi-threading).
This package is ported using pyO3 from rust library bitcoin-explorer
Installation
MacOS, Windows, and Linux wheels are provided.
Use pip install bitcoin-explorer
to install.
Documentation
This library has a Rust version, go to Rust Documentation
For python documentation, go to Documentation.
Compatibility Note
This package deals with the binary file of another software Bitcoin Core
.
It might not be compatible with older Bitcoin Core versions.
Currently, it is compatible with Bitcoin Core version
Bitcoin Core version v0.21.1.0-g194b9b8792d9b0798fdb570b79fa51f1d1f5ebaf Copyright (C) 2009-2020 The Bitcoin Core developers
.
Examples
It contains one class BitcoinDB
.
import bitcoin_explorer as bex
# parse the same path as `--datadir` argument for `bitcoind`.
db = bex.BitcoinDB("~/Bitcoin")
# get the length of the longest chain currently on disk.
db.get_block_count()
# get block of a certain height
db.get_block(1000)
# to retrieve the connected outputs of each inputs as well.
# note that this is inefficient.
# Use `get_block_iter_range(end, connected=True)` for better performance.
db.get_block(1000, connected=True)
# get block hash of a certain height.
db.get_hash_from_height(1000)
# a fast method for getting just the header.
# in memory query, no disk access
db.get_block_header(1000)
# get block of height 1000.
db.get_height_from_hash("some hash")
# get transaction from txid.
# This queries the `levelDB` each time, thus it is relatively slow.
db.get_transaction("some txid")
# get the height of the block which this transaction belongs.
db.get_height_from_txid("some txid")
# get the script type and addresses from a script public key
db.parse_script("some hex script pubic key")
# use iterator
for block in db.get_block_iter_range(start=1000, end=2000):
do_something_with(block)
# use iterator, iterate over heights
for block in db.get_block_iter_array(heights=[1, 3, 5, 7, 9]):
do_something_with(block)
# use iterator, connect outpoints
# This requires 5 GB memory.
for block in db.get_block_iter_range(end=700000, connected=True):
do_something_with(block)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for bitcoin_explorer-1.2.19-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3e97acef19408f0bc87f90908196ef8b73b835f1336a8dd97605b33ccc0ccd2 |
|
MD5 | adbcfb524889270b643004bb2860e42d |
|
BLAKE2b-256 | 98d580e84d39c0cdc3dbc28215bb1081e49b57d0a027c011f58630a69e9384c2 |
Hashes for bitcoin_explorer-1.2.19-cp311-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d80863012647b3893e82a7d29a56be3ca72f181f2f2c325b093566fde7fac3a |
|
MD5 | 2b107e7c69519de6152f3e3e7cbd13d4 |
|
BLAKE2b-256 | 3a0abe3118b6f1601a1e2df72aed0b58f99b4e236e26f4f7e5f5ea55786ed2f4 |
Hashes for bitcoin_explorer-1.2.19-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 340be003727fcee555e070625157ab76876adc187e35871d1ce1e5191d11128c |
|
MD5 | 69fd679b24a48a5bbb56c5ffdee41f30 |
|
BLAKE2b-256 | a62521ca8a58a5bd416e6a2bd3de32f0fc310151febe5591d0b2d0f3af737508 |
Hashes for bitcoin_explorer-1.2.19-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d45e4f7bdeaef0a41c90bc665421cb0705734da4db2c2f028761d414e527867 |
|
MD5 | 0cdc3fd1da27374bfc396b6394aa8984 |
|
BLAKE2b-256 | cc728e5778bf3d62bb472069f417fccba22e4c02628a8c4c28e295ecd1790ef5 |
Hashes for bitcoin_explorer-1.2.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f5173f25e9edb9fae2c5ab67f6c2ff350b6c4b3db9dbf2592c145ac24f84f7c |
|
MD5 | 38ee25944d6182d51a694f25fb075051 |
|
BLAKE2b-256 | 5a05bec93e41aa70fc16b09bb340f7c4cb871983039a84a6042a7d9352204515 |
Hashes for bitcoin_explorer-1.2.19-cp311-cp311-macosx_10_14_x86_64.macosx_11_0_arm64.macosx_10_14_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9feb260b3eb146a7bf3fb625ee4b4971c2ebd077a2f8f6873edcdaab8edeaca1 |
|
MD5 | f3063bfe475b2464037fd614f233e13f |
|
BLAKE2b-256 | 38db24e0442371cda34acac7b8dbb3187352d29540ec8e7a3dce47fda036960d |
Hashes for bitcoin_explorer-1.2.19-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3a7cd99a67eb6cf3f0652d693a47741b9113c5b7c7ee42aa46b58bc40550628 |
|
MD5 | 4b0857e8291fe8dfb3ea0bc3fcf6846f |
|
BLAKE2b-256 | 3758e8f2f0f8a28841e6b9c32a5b0b1c0abd47f1058b0b90f461d93b47b0240e |
Hashes for bitcoin_explorer-1.2.19-cp310-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6fa355e738690b3cb353144e1ca7758ecaf07a3f20c0a13930f884a57883823 |
|
MD5 | 91c98d1bd20f41f48fc513810158060a |
|
BLAKE2b-256 | 19cfb9dea319a4e0e7dd9d443903e07e7633cf3c07c980742abe851b6762b76f |
Hashes for bitcoin_explorer-1.2.19-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f24f470bb4f226ba43c51748601d1975605123179e2e33b10b4038bada9cc88a |
|
MD5 | 05a5594bab34f4d21b0310db944eff8e |
|
BLAKE2b-256 | 25f77014f86657b4519c99814a53d3e5618abc97c518a465e8bd5487943a3328 |
Hashes for bitcoin_explorer-1.2.19-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 721263cc51d95f8f77b4cf8ad5016e430253ef13587d27ce46299ae9ad0484e6 |
|
MD5 | a3376ee9177b8917d1a660d270a4054e |
|
BLAKE2b-256 | af6d7e60ade94d0d1b8ea45057d70e64235c65f517b8b1bad247801ed475277c |
Hashes for bitcoin_explorer-1.2.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9b64a99bc8e8456d12ef738400b68f931f7214d426671dd635c491cdb584e58 |
|
MD5 | 45d0c18122584b42d7cd8cbcc6f71f78 |
|
BLAKE2b-256 | 59b57433b58e09bc872c93bbba2d3c2146d81fa844ba792f7add63ef1111896e |
Hashes for bitcoin_explorer-1.2.19-cp310-cp310-macosx_10_14_x86_64.macosx_11_0_arm64.macosx_10_14_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 943dd1ae5778b09be0f0638442831edea7282b990b74d2e1ef28a63508590f59 |
|
MD5 | 68695bde925bbbdc24f7217d658eb3aa |
|
BLAKE2b-256 | 7ccd93c34a35aa307e3b7db9c5f4a1a43260c5d21c290558ee734226070bf12d |
Hashes for bitcoin_explorer-1.2.19-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e629a95e00f501f6999a37c3b548b377c52a6278bf858238dd150d38e8a52d85 |
|
MD5 | e1579ef50ceb445fa7b593afbd52d87c |
|
BLAKE2b-256 | b616f9ccfa1a51b237e085769b7e79e72ca9e9c7809cfaba5b44235deb9195b3 |
Hashes for bitcoin_explorer-1.2.19-cp39-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92caf94a69f9ff059a0432bef581afea7e042111ab5c05d196eccf87233e742d |
|
MD5 | 14e2d811d0465ddf56c4007c2331c36d |
|
BLAKE2b-256 | 64094ffcf89605d7c3b4d6807f6b272d6c1407b7ff3180a039ed5fb22812c227 |
Hashes for bitcoin_explorer-1.2.19-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6e4be628454afea361c61dd81ccde62152bdee2005b9433588053490eb72739 |
|
MD5 | 7dfa57f64b63b576b0ebfb852ee642a5 |
|
BLAKE2b-256 | 2502c0f961c8b2e5cca30a80a65a2e9c318a82a2516b27f68db004defdf32938 |
Hashes for bitcoin_explorer-1.2.19-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28f0a01590ab301c3c8aec2100f6095ef471d9f2d04fe477382c63e75cdb0f60 |
|
MD5 | 7aa6afd5d898896ff606bb5d7081ddcb |
|
BLAKE2b-256 | 2190519585808a2b65bca04060f6ace244933b2ae6a0cf902e8a12d85ac3b49f |
Hashes for bitcoin_explorer-1.2.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b48c1977d5f5e2e5520572daae1a5b8520c410b4a4aa1ac955867e47301359a |
|
MD5 | 5e58b27c8fb5937673dd749699478756 |
|
BLAKE2b-256 | 0da9fa657268f9f8db14d030ef94c7ca36904e0339c73f0a97b06f3d31cf92ee |
Hashes for bitcoin_explorer-1.2.19-cp39-cp39-macosx_10_14_x86_64.macosx_11_0_arm64.macosx_10_14_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2851c53b9a42ff231ae8012e2f8b84499f0ce43cdc99609221a1a32fa9f260da |
|
MD5 | b7639e0c7a172b0aa8cd69530b0fd1c7 |
|
BLAKE2b-256 | a787e74c25b91bbc129b4c7979b47040650b06619e8ddacd8f19fbdf7983f3d4 |
Hashes for bitcoin_explorer-1.2.19-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 425572d51798f6709eb0b4f3f04711f7fec485378b31fbf5c17ecacb59cbc4c6 |
|
MD5 | c760bc627dea9b6144633881f4dac837 |
|
BLAKE2b-256 | e90a7eb3fc59d8788c9b1a5ac8279ca447149d92617d1b2103ecdf6f07b10ef6 |
Hashes for bitcoin_explorer-1.2.19-cp38-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e2b19dabce039b7d525503e92692e4281f8d8c9f521791aa71082d7b9a3459 |
|
MD5 | d828382e4297c75696ac39ff183f6096 |
|
BLAKE2b-256 | 073cc45b76929b5fbf19fac554290384f924c27d41249c63d2c3454fcf555045 |
Hashes for bitcoin_explorer-1.2.19-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 673103cc4f8a63f5365e839142ebc2eb67439ff25c3e9f4b7c0f21d0cc883b9b |
|
MD5 | 43987439b737dbc4139999793da308b4 |
|
BLAKE2b-256 | a1dc82f91af63773aa790c77f4bf5467243467106a55a7c3a14a919ced8c58f8 |
Hashes for bitcoin_explorer-1.2.19-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8bac9e687a1bc1ce26fb6fb36f414c96a829b7c17cfc23f97accf96f2c77e89 |
|
MD5 | 9380c762cb3f5271ce66ad9881510993 |
|
BLAKE2b-256 | f9e8b5a08e67ad894c7f994716b0f0ec6f5ff46ed0525b979b16a01c211e2e70 |
Hashes for bitcoin_explorer-1.2.19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a74beeb13aea5c08a21af681b7290129b9152970b65e01578b4eb2935be38ec |
|
MD5 | e796776668822e655b928d6bc7b815d1 |
|
BLAKE2b-256 | dcc39d426fd81bd6c8bae9c2602d67c865bb7ed71b0e9a6474f8b699a41b7834 |
Hashes for bitcoin_explorer-1.2.19-cp38-cp38-macosx_10_14_x86_64.macosx_11_0_arm64.macosx_10_14_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6bf8c85a7fb005e153bf7185b79087dab926cc621557c9ad68e621712ac6c49 |
|
MD5 | 25a21b201e42501fcea8c3bd2148a5c3 |
|
BLAKE2b-256 | c2b5309f3172575081b6d4bd7c52e872abbee56b16d63da807063882a349dfe9 |
Hashes for bitcoin_explorer-1.2.19-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a1459820689ae6f03bae3361b6a6b94a23c848ff5bcb083c3b7eaa23a09a23a |
|
MD5 | a004e59369ae219204e414f6d1957d62 |
|
BLAKE2b-256 | 1b6f59247ace96569f3051b8a61c8ccf96a1dbb7a79ce7b313f1d36addc1e4b1 |
Hashes for bitcoin_explorer-1.2.19-cp37-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f60a29b47406d027c6f600972309cf153b00f5877b8cdbc148e3e320ca327518 |
|
MD5 | 04b175bad8317197218228f928294808 |
|
BLAKE2b-256 | 5597bd081b1c3940f5efa3f2d371274f48a0d95e8798d005c5fe359312058e35 |
Hashes for bitcoin_explorer-1.2.19-cp37-cp37m-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1056a1abf11a92fe1c83edc9ce6ce46406db9b7ba896dccd0e2c4cc156e6346 |
|
MD5 | 162424fa4e6938b43b6d4aa623bc7b5f |
|
BLAKE2b-256 | 14cf5408ffdb0dd88e3022f8556260d7e78d13e22917df07fbf6d2389fe699d2 |
Hashes for bitcoin_explorer-1.2.19-cp37-cp37m-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2385ef969116eafe877359da6c5a159971197911ae85066113c267f84f253e79 |
|
MD5 | d7786affab2c4d51605fed3e6b495bb9 |
|
BLAKE2b-256 | 2907535c4f50a5fd3d30f04d1d1977948b373951c54d4810db2f77e316c610a6 |
Hashes for bitcoin_explorer-1.2.19-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a612797bcd802edf263a1ab8ed2c019c002fa0ef296804d9411126f90f2245d |
|
MD5 | 36ff39a54a1e977485c5c4d102839f59 |
|
BLAKE2b-256 | 45898cde6bf2f6ebff1e0d86a75579523ceab8f95e24e509abb733df93571e68 |
Hashes for bitcoin_explorer-1.2.19-cp37-cp37m-macosx_10_14_x86_64.macosx_11_0_arm64.macosx_10_14_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 511485da02d3d8905c77a0eedc9bcabbaeeb70bfbc71ad10916a772005585b7b |
|
MD5 | d8a02f7766cfda4fe9797aa6bbd27a80 |
|
BLAKE2b-256 | 7665c03354e2e153f68a2fcc017debd1d0252d2f5a158e3c0c516cb2c0eea664 |