python-evrmorelib


Namepython-evrmorelib JSON
Version 0.2.9 PyPI version JSON
download
home_pagehttps://github.com/standard-error/python-evrmorelib
SummaryEvrmore fork of python-ravencoinlib, a fork of python-bitcoinlib
upload_time2025-01-09 17:04:25
maintainerNone
docs_urlNone
authorstandard-error@github
requires_pythonNone
licenseNone
keywords evrmore
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python-evrmorelib

Evrmore fork of python-bitcoinlib intended to provide access to Evrmore data 
structures and protocol. WIP - Test before use

The RPC interface, evrmore.rpc, is designed to work with Evrmore Core v3.3.0+.

"The only Python library for Evrmore I've ever used" - Warren Buffett

## Requirements

    libssl
    Debian/Ubuntu: sudo apt-get install libssl-dev
    Windows/other: https://wiki.openssl.org/index.php/Binaries 

    Python modules:
        x16r-hash, x16rv2-hash and kawpow
        plyvel (requires libleveldb - for parsing Raven core .dat files)

## Structure

Everything consensus critical is found in the modules under evrmore.core. This
rule is followed pretty strictly, for instance chain parameters are split into
consensus critical and non-consensus-critical.

    evrmore.core            - Basic core definitions, datastructures, and
                              (context-independent) validation
    evrmore.core.assets     - OP_EVR_ASSET data structures
    evrmore.core.key        - ECC pubkeys
    evrmore.core.script     - Scripts and opcodes
    evrmore.core.scripteval - Script evaluation/verification
    evrmore.core.serialize  - Serialization

In the future the evrmore.core may use the Satoshi sourcecode directly as a
library. Non-consensus critical modules include the following:

    evrmore          - Chain selection
    evrmore.assets   - Asset name and metadata related code
    evrmore.base58   - Base58 encoding
    evrmore.bloom    - Bloom filters (incomplete)
    evrmore.net      - Network communication (in flux)
    evrmore.messages - Network messages (in flux)
    evrmore.rpc      - Evrmore Core RPC interface support
    evrmore.wallet   - Wallet-related code, currently Evrmore address and
                       private key support

Effort has been made to follow the Satoshi source relatively closely, for
instance Python code and classes that duplicate the functionality of
corresponding Satoshi C++ code uses the same naming conventions: CTransaction,
CBlockHeader, nValue etc. Otherwise Python naming conventions are followed.


## Mutable vs. Immutable objects

Like the Evrmore Core codebase CTransaction is immutable and
CMutableTransaction is mutable; unlike the Evrmore Core codebase this
distinction also applies to COutPoint, CTxIn, CTxOut, and CBlock.


## Endianness Gotchas

Rather confusingly Evrmore Core shows transaction and block hashes as
little-endian hex rather than the big-endian the rest of the world uses for
SHA256. python-evrmorelib provides the convenience functions x() and lx() in
evrmore.core to convert from big-endian and little-endian hex to raw bytes to
accomodate this. In addition see b2x() and b2lx() for conversion from bytes to
big/little-endian hex.


## Module import style

While not always good style, it's often convenient for quick scripts if
`import *` can be used. To support that all the modules have `__all__` defined
appropriately.


# Example Code

See `examples/` directory. For instance this example creates a transaction
spending a pay-to-script-hash transaction output:

    $ PYTHONPATH=. examples/spend-pay-to-script-hash-txout.py
    <hex-encoded transaction>


## Selecting the chain to use

Do the following:

    import evrmore
    evrmore.SelectParams(NAME)

Where NAME is one of 'testnet', 'mainnet', or 'regtest'. The chain currently
selected is a global variable that changes behavior everywhere, just like in
the Satoshi codebase.


## Unit tests

Under evrmore/tests using test data from Evrmore Core. To run them:

    python3 -m unittest discover

Alternately, if Tox (see https://tox.readthedocs.org/) is available on your
system, you can run unit tests for multiple Python versions:

    ./runtests.sh

HTML coverage reports can then be found in the htmlcov/ subdirectory.

## Documentation

Sphinx documentation is in the "doc" subdirectory. Run "make help" from there
to see how to build. You will need the Python "sphinx" package installed.

Currently this is just API documentation generated from the code and
docstrings. Higher level written docs would be useful, perhaps starting with
much of this README. Pages are written in reStructuredText and linked from
index.rst.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/standard-error/python-evrmorelib",
    "name": "python-evrmorelib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "evrmore",
    "author": "standard-error@github",
    "author_email": "satorinetio@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a8/90/aa8c412e4277d2a4a058ef984969e07bec6492945b192a653bbaf126dea1/python_evrmorelib-0.2.9.tar.gz",
    "platform": null,
    "description": "# python-evrmorelib\n\nEvrmore fork of python-bitcoinlib intended to provide access to Evrmore data \nstructures and protocol. WIP - Test before use\n\nThe RPC interface, evrmore.rpc, is designed to work with Evrmore Core v3.3.0+.\n\n\"The only Python library for Evrmore I've ever used\" - Warren Buffett\n\n## Requirements\n\n    libssl\n    Debian/Ubuntu: sudo apt-get install libssl-dev\n    Windows/other: https://wiki.openssl.org/index.php/Binaries \n\n    Python modules:\n        x16r-hash, x16rv2-hash and kawpow\n        plyvel (requires libleveldb - for parsing Raven core .dat files)\n\n## Structure\n\nEverything consensus critical is found in the modules under evrmore.core. This\nrule is followed pretty strictly, for instance chain parameters are split into\nconsensus critical and non-consensus-critical.\n\n    evrmore.core            - Basic core definitions, datastructures, and\n                              (context-independent) validation\n    evrmore.core.assets     - OP_EVR_ASSET data structures\n    evrmore.core.key        - ECC pubkeys\n    evrmore.core.script     - Scripts and opcodes\n    evrmore.core.scripteval - Script evaluation/verification\n    evrmore.core.serialize  - Serialization\n\nIn the future the evrmore.core may use the Satoshi sourcecode directly as a\nlibrary. Non-consensus critical modules include the following:\n\n    evrmore          - Chain selection\n    evrmore.assets   - Asset name and metadata related code\n    evrmore.base58   - Base58 encoding\n    evrmore.bloom    - Bloom filters (incomplete)\n    evrmore.net      - Network communication (in flux)\n    evrmore.messages - Network messages (in flux)\n    evrmore.rpc      - Evrmore Core RPC interface support\n    evrmore.wallet   - Wallet-related code, currently Evrmore address and\n                       private key support\n\nEffort has been made to follow the Satoshi source relatively closely, for\ninstance Python code and classes that duplicate the functionality of\ncorresponding Satoshi C++ code uses the same naming conventions: CTransaction,\nCBlockHeader, nValue etc. Otherwise Python naming conventions are followed.\n\n\n## Mutable vs. Immutable objects\n\nLike the Evrmore Core codebase CTransaction is immutable and\nCMutableTransaction is mutable; unlike the Evrmore Core codebase this\ndistinction also applies to COutPoint, CTxIn, CTxOut, and CBlock.\n\n\n## Endianness Gotchas\n\nRather confusingly Evrmore Core shows transaction and block hashes as\nlittle-endian hex rather than the big-endian the rest of the world uses for\nSHA256. python-evrmorelib provides the convenience functions x() and lx() in\nevrmore.core to convert from big-endian and little-endian hex to raw bytes to\naccomodate this. In addition see b2x() and b2lx() for conversion from bytes to\nbig/little-endian hex.\n\n\n## Module import style\n\nWhile not always good style, it's often convenient for quick scripts if\n`import *` can be used. To support that all the modules have `__all__` defined\nappropriately.\n\n\n# Example Code\n\nSee `examples/` directory. For instance this example creates a transaction\nspending a pay-to-script-hash transaction output:\n\n    $ PYTHONPATH=. examples/spend-pay-to-script-hash-txout.py\n    <hex-encoded transaction>\n\n\n## Selecting the chain to use\n\nDo the following:\n\n    import evrmore\n    evrmore.SelectParams(NAME)\n\nWhere NAME is one of 'testnet', 'mainnet', or 'regtest'. The chain currently\nselected is a global variable that changes behavior everywhere, just like in\nthe Satoshi codebase.\n\n\n## Unit tests\n\nUnder evrmore/tests using test data from Evrmore Core. To run them:\n\n    python3 -m unittest discover\n\nAlternately, if Tox (see https://tox.readthedocs.org/) is available on your\nsystem, you can run unit tests for multiple Python versions:\n\n    ./runtests.sh\n\nHTML coverage reports can then be found in the htmlcov/ subdirectory.\n\n## Documentation\n\nSphinx documentation is in the \"doc\" subdirectory. Run \"make help\" from there\nto see how to build. You will need the Python \"sphinx\" package installed.\n\nCurrently this is just API documentation generated from the code and\ndocstrings. Higher level written docs would be useful, perhaps starting with\nmuch of this README. Pages are written in reStructuredText and linked from\nindex.rst.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Evrmore fork of python-ravencoinlib, a fork of python-bitcoinlib",
    "version": "0.2.9",
    "project_urls": {
        "Homepage": "https://github.com/standard-error/python-evrmorelib"
    },
    "split_keywords": [
        "evrmore"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7cf65356c1774babd1425d33bdffa8d942a198abf46352f41727c2df15136f7a",
                "md5": "71ee925ec9906dd45c6d78406557d76b",
                "sha256": "c84f800ba8cbe41a3bd4c14f3fe6b3f7e509b9848ef58a72713b7fceda9ded4d"
            },
            "downloads": -1,
            "filename": "python_evrmorelib-0.2.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "71ee925ec9906dd45c6d78406557d76b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 126684,
            "upload_time": "2025-01-09T17:04:21",
            "upload_time_iso_8601": "2025-01-09T17:04:21.413639Z",
            "url": "https://files.pythonhosted.org/packages/7c/f6/5356c1774babd1425d33bdffa8d942a198abf46352f41727c2df15136f7a/python_evrmorelib-0.2.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a890aa8c412e4277d2a4a058ef984969e07bec6492945b192a653bbaf126dea1",
                "md5": "bdbb3e3589eec8408c3d60720171433a",
                "sha256": "824f025287ce513d55e4cc8b4debf285d70a1a46850153ceca09717ad9cf54b3"
            },
            "downloads": -1,
            "filename": "python_evrmorelib-0.2.9.tar.gz",
            "has_sig": false,
            "md5_digest": "bdbb3e3589eec8408c3d60720171433a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 161793,
            "upload_time": "2025-01-09T17:04:25",
            "upload_time_iso_8601": "2025-01-09T17:04:25.977714Z",
            "url": "https://files.pythonhosted.org/packages/a8/90/aa8c412e4277d2a4a058ef984969e07bec6492945b192a653bbaf126dea1/python_evrmorelib-0.2.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-09 17:04:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "standard-error",
    "github_project": "python-evrmorelib",
    "github_not_found": true,
    "lcname": "python-evrmorelib"
}
        
Elapsed time: 0.84239s