From 9ac8c9ebd45a8ada4a33ea8bba7236abf2cf8911 Mon Sep 17 00:00:00 2001 From: gberdyshev <145838940+gberdyshev@users.noreply.github.com> Date: Tue, 26 Sep 2023 22:50:58 +0500 Subject: [PATCH 1/4] Fix bug (incorrect witness addresses) --- cryptos/coins_async/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptos/coins_async/base.py b/cryptos/coins_async/base.py index 9501242..14df2fa 100644 --- a/cryptos/coins_async/base.py +++ b/cryptos/coins_async/base.py @@ -1072,7 +1072,7 @@ async def inspect(self, tx: Union[str, Tx]) -> TXInspectType: 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 { From 8d72c68f443fa7947a336755b9da9e550ced7941 Mon Sep 17 00:00:00 2001 From: gberdyshev <145838940+gberdyshev@users.noreply.github.com> Date: Fri, 29 Sep 2023 16:19:07 +0500 Subject: [PATCH 2/4] Fix bug x2 --- cryptos/coins_async/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptos/coins_async/base.py b/cryptos/coins_async/base.py index 14df2fa..685719e 100644 --- a/cryptos/coins_async/base.py +++ b/cryptos/coins_async/base.py @@ -1067,7 +1067,7 @@ 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 From 64961a8c787a4a5ad02be1fb845107ef41f69350 Mon Sep 17 00:00:00 2001 From: gberdyshev <145838940+gberdyshev@users.noreply.github.com> Date: Wed, 3 Jan 2024 22:27:02 +0500 Subject: [PATCH 3/4] Prepare to PyPi --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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=[ From b168f80a36f2718b5d3f88554b4dcc90119f7752 Mon Sep 17 00:00:00 2001 From: gberdyshev <145838940+gberdyshev@users.noreply.github.com> Date: Wed, 3 Jan 2024 22:33:45 +0500 Subject: [PATCH 4/4] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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.