uplc


Nameuplc JSON
Version 1.0.7 PyPI version JSON
download
home_pagehttps://github.com/opshin/uplc
SummaryPython implementation of untyped plutus language core
upload_time2024-10-08 15:00:30
maintainerNone
docs_urlNone
authornielstron
requires_python<3.12,>=3.8
licenseMIT
keywords python language programming-language compiler validator smart-contracts cardano
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Untyped Plutus Language Core 
==================================================
[![CI/CD](https://github.com/OpShin/uplc/actions/workflows/build.yml/badge.svg)](https://github.com/OpShin/uplc/actions/workflows/build.yml)
 [![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.11.
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": null,
    "docs_url": null,
    "requires_python": "<3.12,>=3.8",
    "maintainer_email": null,
    "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/df/23/92ee8e1b2508f7fe1e4aa389ca627653f58c7c42b72c113be37e22583475/uplc-1.0.7.tar.gz",
    "platform": null,
    "description": "Untyped Plutus Language Core \n==================================================\n[![CI/CD](https://github.com/OpShin/uplc/actions/workflows/build.yml/badge.svg)](https://github.com/OpShin/uplc/actions/workflows/build.yml)\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.11.\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.7",
    "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": "4b531d4caadd5cef3e41f51ff7955094897744b54ab0f243a76d7630ca51fe8e",
                "md5": "4af04875d385325dbc8ac54cf73eebe8",
                "sha256": "ad6f08473c5b7bf9d2c9e1d083bcafe3bfd5eac6670f826ed6cd77c535b7e718"
            },
            "downloads": -1,
            "filename": "uplc-1.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4af04875d385325dbc8ac54cf73eebe8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.8",
            "size": 57474,
            "upload_time": "2024-10-08T15:00:28",
            "upload_time_iso_8601": "2024-10-08T15:00:28.370813Z",
            "url": "https://files.pythonhosted.org/packages/4b/53/1d4caadd5cef3e41f51ff7955094897744b54ab0f243a76d7630ca51fe8e/uplc-1.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df2392ee8e1b2508f7fe1e4aa389ca627653f58c7c42b72c113be37e22583475",
                "md5": "fa8737bf251aed007ae990a2daded20e",
                "sha256": "63b51e0ccbf87f18a1d56ae53fae4312bc989b73f20cc82ec22f2ad06bd14be0"
            },
            "downloads": -1,
            "filename": "uplc-1.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "fa8737bf251aed007ae990a2daded20e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.12,>=3.8",
            "size": 49203,
            "upload_time": "2024-10-08T15:00:30",
            "upload_time_iso_8601": "2024-10-08T15:00:30.056989Z",
            "url": "https://files.pythonhosted.org/packages/df/23/92ee8e1b2508f7fe1e4aa389ca627653f58c7c42b72c113be37e22583475/uplc-1.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-08 15:00:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "opshin",
    "github_project": "uplc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "uplc"
}
        
Elapsed time: 0.32206s