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

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

# 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.

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.6.9.tar.gz (31.8 kB view details)

Uploaded Source

Built Distribution

uplc-0.6.9-py3-none-any.whl (36.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uplc-0.6.9.tar.gz
  • Upload date:
  • Size: 31.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/5.4.0-131-generic

File hashes

Hashes for uplc-0.6.9.tar.gz
Algorithm Hash digest
SHA256 a4f3990d9a009718e719d33d03e448946b195b0c31d9bd4700df85c13b384616
MD5 3bcbb404d1aaf79e8ec7a5adebcf7989
BLAKE2b-256 26568b27fa6bede573d74cb5bab82675e2b11d8c2ed8eef6b27380aab28f451b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uplc-0.6.9-py3-none-any.whl
  • Upload date:
  • Size: 36.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/5.4.0-131-generic

File hashes

Hashes for uplc-0.6.9-py3-none-any.whl
Algorithm Hash digest
SHA256 1815aef89ce5f169ef7ebc2ea4090e488fb4d84785a41c16e1114a0a73cea996
MD5 5720b35e13ecba62d38d8d6232e8b036
BLAKE2b-256 248b39683b249c0b19326592730bbb5c5f09441d1c5a2d1306be8f2953d6093d

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