diff --git a/README.md b/README.md index 7e36b5d..68ba9e6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Pycryptotools, Python library for Crypto coins signatures and transactions +This is a fork of the Paul Martin library, which fixed a bug with displaying addresses of the Witness standard. +The following is a description of the original library: + This is a fork of Vitalik Buterin's original [pybitcointools](https://github.com/vbuterin/pybitcointools) library. After a lot of work, the library is finally active again and being actively updated. This took a lot of work and unfortunately some backward imcompatible changes may have been introduced in v2. If you run into issues after upgrading open an issue and will try to help. If it's reasonable to do so we can consider restoring the previous behaviour in v2, otherwise will assist with migration. @@ -620,4 +623,4 @@ not understanding what they were doing or because of bugs. ### Working together If you wish to work together on crypto or other software related projects you can contact me using social links on my Github profile. -I can very easily and quickly build software tools on top of this pybitcointools library. \ No newline at end of file +I can very easily and quickly build software tools on top of this pybitcointools library. diff --git a/cryptos/coins_async/base.py b/cryptos/coins_async/base.py index 9501242..685719e 100644 --- a/cryptos/coins_async/base.py +++ b/cryptos/coins_async/base.py @@ -1067,12 +1067,12 @@ async def inspect(self, tx: Union[str, Tx]) -> TXInspectType: i = _in['tx_pos'] prevout = (await anext(self.get_txs(h)))['outs'][i] isum += prevout['value'] - a = self.scripttoaddr(prevout['script']) + a = self.output_script_to_address(prevout['script']) ins[a] = ins.get(a, 0) + prevout['value'] outs = [] osum = 0 for _out in tx['outs']: - outs.append({'address': self.scripttoaddr(_out['script']), + outs.append({'address': self.output_script_to_address(_out['script']), 'value': _out['value']}) osum += _out['value'] return { diff --git a/setup.py b/setup.py index 2257583..99340c5 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,14 @@ #!/usr/bin/env python from setuptools import setup, find_packages -setup(name='cryptos', +setup(name='cryptos_witness', version='2.0.9', description='Python Crypto Coin Tools', long_description=open('README.md').read(), long_description_content_type='text/markdown', - author='Paul Martin', - author_email='greatestloginnameever@gmail.com', - url='http://github.com/primal100/pybitcointools', + author='gberdyshev', + author_email='bga20100@gmail.com', + url='https://github.com/gberdyshev/pybitcointools', packages=find_packages(), include_package_data=True, install_requires=[