uplc


Nameuplc JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://github.com/opshin/uplc
SummaryPython implementation of untyped plutus language core
upload_time2024-03-17 13:02:16
maintainer
docs_urlNone
authornielstron
requires_python>=3.8,<3.12
licenseMIT
keywords python language programming-language compiler validator smart-contracts cardano
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            Untyped Plutus Language Core 
==================================================
[![Build Status](https://app.travis-ci.com/OpShin/uplc.svg?branch=master)](https://app.travis-ci.com/OpShin/uplc)
 [![PyPI version](https://badge.fury.io/py/uplc.svg)](https://pypi.org/project/uplc/)
 ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/uplc.svg)
 [![PyPI - Status](https://img.shields.io/pypi/status/uplc.svg)](https://pypi.org/project/uplc/)
[![Coverage Status](https://coveralls.io/repos/github/OpShin/uplc/badge.svg?branch=master)](https://coveralls.io/github/OpShin/uplc?branch=master)

This is a basic library to support creating and manipulating programs written in [UPLC](https://blog.hachi.one/post/an-introduction-to-plutus-core/).

## Installation

Install anything between python 3.8 and 3.10.
Then run

```bash
pip install uplc
```

### Secp256k1

If you want to use the builtin functions for verification of ECDSA and Schnorr signatures,
follow the instructions to install `libsecp256k1` with schnorr support enabled:

https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/getting-started/install.md#installing-secp256k1

This makes sure that the exact same version is used that is used in the `cardano-node`.

## Usage

This tool may be used to parse, reformat (/dump), evaluate or build contract artifacts from UPLC code.

```bash
# Check validity of a source file
uplc parse examples/fibonacci.uplc

# Dump a source file in either the official plutus or legacy aiken dialect
uplc dump examples/fibonacci.uplc --dialect plutus --unique-varnames
uplc dump examples/fibonacci.uplc --dialect legacy-aiken

# Evaluate a UPLC program on UPLC input
uplc eval examples/fibonacci.uplc "(con integer 5)"

# Build smart contract artifacts from the UPLC program
uplc build examples/fibonacci.uplc

# This package can also be used to analyze built contracts (output from any Smart Contract Language)
uplc dump build/fibonacci/script.cbor --from-cbor

# You can also apply additional parameters to a script using the build command
uplc build script.cbor --from-cbor "(con integer 5)"

# Show all options
uplc --help
```


## Scope and Contributions
This is a side product of the development of a pythonic smart contract language for the Cardano blockchain
and hence much tailored to the needs of that development.

Most likely it *can* do what you would like to do but its not properly documented. Please do reach out via Discord or GitHub issue if you think this tool could be of use to you.

Contributions are very welcome.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/opshin/uplc",
    "name": "uplc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<3.12",
    "maintainer_email": "",
    "keywords": "python,language,programming-language,compiler,validator,smart-contracts,cardano",
    "author": "nielstron",
    "author_email": "n.muendler@web.de",
    "download_url": "https://files.pythonhosted.org/packages/58/77/5ccd6f7b5695272ecee4f47e0735a37421494ee38db11d6e73823bd43dd9/uplc-1.0.4.tar.gz",
    "platform": null,
    "description": "Untyped Plutus Language Core \n==================================================\n[![Build Status](https://app.travis-ci.com/OpShin/uplc.svg?branch=master)](https://app.travis-ci.com/OpShin/uplc)\n [![PyPI version](https://badge.fury.io/py/uplc.svg)](https://pypi.org/project/uplc/)\n ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/uplc.svg)\n [![PyPI - Status](https://img.shields.io/pypi/status/uplc.svg)](https://pypi.org/project/uplc/)\n[![Coverage Status](https://coveralls.io/repos/github/OpShin/uplc/badge.svg?branch=master)](https://coveralls.io/github/OpShin/uplc?branch=master)\n\nThis is a basic library to support creating and manipulating programs written in [UPLC](https://blog.hachi.one/post/an-introduction-to-plutus-core/).\n\n## Installation\n\nInstall anything between python 3.8 and 3.10.\nThen run\n\n```bash\npip install uplc\n```\n\n### Secp256k1\n\nIf you want to use the builtin functions for verification of ECDSA and Schnorr signatures,\nfollow the instructions to install `libsecp256k1` with schnorr support enabled:\n\nhttps://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/getting-started/install.md#installing-secp256k1\n\nThis makes sure that the exact same version is used that is used in the `cardano-node`.\n\n## Usage\n\nThis tool may be used to parse, reformat (/dump), evaluate or build contract artifacts from UPLC code.\n\n```bash\n# Check validity of a source file\nuplc parse examples/fibonacci.uplc\n\n# Dump a source file in either the official plutus or legacy aiken dialect\nuplc dump examples/fibonacci.uplc --dialect plutus --unique-varnames\nuplc dump examples/fibonacci.uplc --dialect legacy-aiken\n\n# Evaluate a UPLC program on UPLC input\nuplc eval examples/fibonacci.uplc \"(con integer 5)\"\n\n# Build smart contract artifacts from the UPLC program\nuplc build examples/fibonacci.uplc\n\n# This package can also be used to analyze built contracts (output from any Smart Contract Language)\nuplc dump build/fibonacci/script.cbor --from-cbor\n\n# You can also apply additional parameters to a script using the build command\nuplc build script.cbor --from-cbor \"(con integer 5)\"\n\n# Show all options\nuplc --help\n```\n\n\n## Scope and Contributions\nThis is a side product of the development of a pythonic smart contract language for the Cardano blockchain\nand hence much tailored to the needs of that development.\n\nMost likely it *can* do what you would like to do but its not properly documented. Please do reach out via Discord or GitHub issue if you think this tool could be of use to you.\n\nContributions are very welcome.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python implementation of untyped plutus language core",
    "version": "1.0.4",
    "project_urls": {
        "Homepage": "https://github.com/opshin/uplc",
        "Repository": "https://github.com/opshin/uplc"
    },
    "split_keywords": [
        "python",
        "language",
        "programming-language",
        "compiler",
        "validator",
        "smart-contracts",
        "cardano"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "247769210a4f80bad65bd0b07c37a8f3469dde40ebdf1f8ec809616642a19c2f",
                "md5": "44804b28d79a42a14bc47d15124301d1",
                "sha256": "b67f51d1efceec9431b97d734c7762419cb87ef63fde7ab34e56634ae8416201"
            },
            "downloads": -1,
            "filename": "uplc-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "44804b28d79a42a14bc47d15124301d1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<3.12",
            "size": 52764,
            "upload_time": "2024-03-17T13:02:15",
            "upload_time_iso_8601": "2024-03-17T13:02:15.015532Z",
            "url": "https://files.pythonhosted.org/packages/24/77/69210a4f80bad65bd0b07c37a8f3469dde40ebdf1f8ec809616642a19c2f/uplc-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58775ccd6f7b5695272ecee4f47e0735a37421494ee38db11d6e73823bd43dd9",
                "md5": "8d6d568da82b0d14dcaa1229168da6bd",
                "sha256": "d21f8cfc7cce85f9b6427b48141934ea1192b66d4dfcffdeb830e290c9c0d8b6"
            },
            "downloads": -1,
            "filename": "uplc-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "8d6d568da82b0d14dcaa1229168da6bd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<3.12",
            "size": 44537,
            "upload_time": "2024-03-17T13:02:16",
            "upload_time_iso_8601": "2024-03-17T13:02:16.497491Z",
            "url": "https://files.pythonhosted.org/packages/58/77/5ccd6f7b5695272ecee4f47e0735a37421494ee38db11d6e73823bd43dd9/uplc-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-17 13:02:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "opshin",
    "github_project": "uplc",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "uplc"
}
        
Elapsed time: 0.32060s