Package: neocore
Library for working with NEO related data in Python, without database dependencies.Datatypes likeUInt160,KeyPair,BigIntegerand basic string to address and address toUInt160methodsIncludes a useful cli-toolnp-utils(see help withnp-utils-h)Compatible with Python 3.5+Used byneo-pythonhttps://pypi.python.org/pypi/neocorenp-utilsexamples:$np-utils-husage: np-utils [-h] [--version] [--address-to-scripthash address]
                [--scripthash-to-address scripthash] [--create-wallet]

optional arguments:
-h, --help            show this help message and exit
--version             show program's version number and exit
--address-to-scripthash address
                        Convert an address to scripthash
--scripthash-to-address scripthash
                        Convert scripthash to address
--create-wallet       Create a wallet$np-utils--create-wallet{
"private_key": "KwJqCbjsmGUCqbkp83Nxi9MJ9mA7F8EN4tebJVWjYZBEoWCNxCaF",
"address": "AHVvg26CNz1vxteJfeHy4R8P4VN8SydCM6"
}$np-utils--address-to-scripthashAK2nJJpJr6o664CWJKi1QRXjqeic2zRp8yScripthash big endian:  0xe9eed8dc39332032dc22e5d6e86332c50327ba23
Scripthash little endian: 23ba2703c53263e8d6e522dc32203339dcd8eee9
Scripthash neo-python format: b'#\xba\'\x03\xc52c\xe8\xd6\xe5"\xdc2 39\xdc\xd8\xee\xe9'$np-utils--scripthash-to-address0xe9eed8dc39332032dc22e5d6e86332c50327ba23AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y$np-utils--scripthash-to-address23ba2703c53263e8d6e522dc32203339dcd8eee9Detected little endian scripthash. Converting to big endian for internal use.
Big endian scripthash: 0xe9eed8dc39332032dc22e5d6e86332c50327ba23
AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8yGetting startedYou need Python 3.5 or higher!You can installneocorefrom PyPI witheasy_installorpip:$pipinstall-UneocoreAlternatively, if you want to work on the code, clone this repository and setup your venv:Clone the repo:git clonehttps://github.com/CityOfZion/neo-python-core.gitCreate a Python 3 virtual environment and activate it:$python3-mvenvvenv$sourcevenv/bin/activateThen install the requirements:$pipinstall-e.$pipinstall-rrequirements_dev.txtUseful commands$makelint$maketest$makecoverageRelease checklist(Only for admins)Releasing a new version on GitHub automatically uploads this release to PyPI.
This is a checklist for releasing a new version:#Onlyincaseyouwanttoincreasetheversionnumberagain(eg.scopechangedfrompatchtominor):bumpversion --no-tag minor|major#Update``HISTORY.rst``withthenewversionnumberandthechangesandcommitthisvi HISTORY.rst
git commit -m "Updated HISTORY.rst" HISTORY.rst#Setthereleaseversionnumberandcreatethetagbumpversion release#Increasepatchnumberandadd`-dev`bumpversion --no-tag patch#PushtoGitHub,whichalsoupdatesthePyPIpackagegit push && git push --tagsHistory0.5.6 2018-12-18Updated dependenciesAddedSafeReadBytestoBinaryReader0.5.5 2018-12-18Updated dependenciesAddedisValidPublicAddress()to utility module0.5.4 2018-10-31UpdatedBigIntegerto properly support logical shiftsAdded tests fornp-utilsUpdated dependencies0.5.3 2018-10-02Updated the dependencies0.5.2 (2018-08-28)Fixed8.TryParsefix for zeroUpdated dependencies0.5.1 (2018-08-23)Change BigInteger divisor operation to use floordiv rather than truediv0.5.0 (2018-08-21)np-utils –address-to-scripthashoutputs now little-endian and big-endian scripthashesnp-utils –scripthash-to-addressdetects input endianness and converts accordinglyUpdated dependencies0.4.11 (2018-07-05)AddedSize()method toECPointandFixed8class.0.4.10 (2018-06-25)Updated requirements: pycryptome0.4.9 (2018-06-08)Updated dependencies, especially base580.4.8 (2018-05-31)Create wallets withnp-utils--create-wallet0.4.7 (2018-05-30)BigInteger(0)now isb'\x00'(PR #50)0.4.6 (2018-04-30)make unhexlify in Crypto.VerifySignature optional (PR #48)0.4.2 (2018-04-26)np-utilsnow supports--scripthash-to-address(thx @belane)0.4.1 (2018-04-26)np-utilscli tool (seecli.py,PR #40)alter initialization of Crypto signature curve0.3.10 (2018-03-21)Fix formatting ofToNeoJsonString()which was cutting off trailing zeroes from integers.0.3.8 (2018-03-14)Fix travis deploy to be compatible with recent neo-python changesUpdate scrypt and logzero dependency versions0.3.6 (2018-02-26)Enabled Python >= 3.4 in setup.py0.3.5 (2018-02-15)Bugfix: Dont unhex when writing var bytes (PR #36)0.3.4 (2018-01-25)AddedParseStringmethod to UInt160/UInt256 (PR #35)0.3.3 (2018-01-25)AddedFixed8.ToJsonString()(PR #33)0.3.2 (2018-01-23)Added UIntTo0xStringmethod0.3.1 (2018-01-09)Documentation updateMoved thecryptographydependency torequirements_dev.txt0.3.0 (2018-01-09)Addedneo.CryptographyandKeyPairChanged signature ofneocore.Cryptography.Crypto.Sign()to remove unusedpublic_keyargumentRemoved redundantneocore.Cryptography.Helper.hash_to_wallet_address()function, useneocore.Cryptography.Helper.scripthash_to_address()instead.Removed unusedneocore.Cryptography.Helperfunctions:random_string,bytes_to_hex_string,bin_sha256,sha256,random_key.0.2.4 + 0.2.5 (2018-01-03)Bugfix for deploying from Travis to PyPI/neocore0.2.3 (2018-01-03)Bugfix for BinaryWriter (PR #13)0.2.1 (2018-01-02)Added UInt*, Fixed8 and neo.IO.Binary* (PR #9)0.1.1 - 0.1.2 (2017-12-30)Testing of releases on PyPI with Travis CI.0.1.0 (2017-12-28)First release on PyPI.