Skip to main content

Python implementation of untyped plutus language core

Project description

Untyped Plutus Language Core

Build Status PyPI version PyPI - Python Version PyPI - Status Coverage Status

This is a basic library to support creating and manipulating programs written in UPLC.

Installation

Install anything between python 3.8 and 3.10. Then run

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/blob/master/doc/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.

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

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

# 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

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.

Contributions are very welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uplc-0.5.6.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

uplc-0.5.6-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file uplc-0.5.6.tar.gz.

File metadata

  • Download URL: uplc-0.5.6.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for uplc-0.5.6.tar.gz
Algorithm Hash digest
SHA256 6c15cf50bf90d227723222e8e5b55247fd3266261a0d4f231f8edd06031829bb
MD5 1a65598663eb04b996c3716ebf6c14a4
BLAKE2b-256 76fb990107d5ac4f5de4cee15a4e17b0afc9df9403017a44fe91145034e1a0f1

See more details on using hashes here.

File details

Details for the file uplc-0.5.6-py3-none-any.whl.

File metadata

  • Download URL: uplc-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for uplc-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 65bbd36b964ddf09d5f630d256b24b3f07b868a461a1be7306297ac15dffe8bb
MD5 a40f40df64c1a3b44849088e9a8f304f
BLAKE2b-256 1629ee55b2cd801cc497de3c818d58fc13483d89e6ed2c0731a56c02e4abd1a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page