Comments (2)
Bitcoin transactions refer to previous outputs by the tuple (transaction hash, output index). In order to get the input address, you have to resolve which output the tuple points to.
Most explorers do this and maintain a large database with this information. For simplicity sake, this project doesn't do this out of the box, so you'd have to maintain that database of (transaction hash, output index, output value, output address) yourself.
from python-bitcoin-blockchain-parser.
This library support finding input address: https://github.com/Congyuwang/Py-Bitcoin-Explorer
pip install bitcoin_explorer
With connected=True
, blocks are iterated in sequential order & input addresses are attached.
import bitcoin_explorer as bex
# parse the same path as `--datadir` argument for `bitcoind`.
db = bex.BitcoinDB("~/Bitcoin")
for block in db.get_block_iter_range(end=700000, connected=True):
do_something_with(block)
from python-bitcoin-blockchain-parser.
Related Issues (20)
- Update Readme - Pip Install HOT 1
- Output Multiple Addresses - Value for each HOT 2
- db parameter in get_transaction HOT 3
- Retrieve All Unspent Bitcoin Addresses
- plyvel fails to build on every system. HOT 4
- How to interpret Output.adresses HOT 1
- blockchain.get_ordered_blocks() does not iterate all blocks HOT 2
- Install on Python 3.11 fails with " fatal error: longintrepr.h: No such file or directory"
- Input class : inputs addresses and values
- class Script(): def self._addresses = None
- when i use Blockchain.get_ordered_blocks,,there is an error: HOT 6
- Double definition of hash property in transactions.py HOT 1
- is_unknown() method in script.py missing is_p2wsh and is_p2wpkh checks HOT 1
- The results of the analysis are compared with those in the https://btc.com The query results above are different HOT 9
- running ./tests.sh results in KeyError: 'BREAK_LOOP' HOT 4
- Block time HOT 2
- I/O Error when calling get_ordered_blocks HOT 1
- invalid transactions for some blocks HOT 2
- get list of all adresses on bitcoin block chain HOT 1
- Using get_unordered_blocks from example throws: UnboundLocalError: local variable 'transaction' referenced before assignment`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-bitcoin-blockchain-parser.