Skip to main content

Python bindings for aiken

Project description

pyaiken

This package supplies python bindings for the package aiken. The bindings are added on a per-need basis, currently only serving the development of eopsin

Installation

Install python3. Then run the following command.

python3 -m pip install pyaiken

Usage

from pyaiken import uplc, script_address

# Tools for handling UPLC

### uplc.flat
# Print the hex of the CBOR encoded flat-encoding of the program in UPLC textual notation
code = uplc.flat("(program 1.0.0 (con data #01))")

print(code)
# prints "490100004c0101010001"

### uplc.eval
# Evaluate a UPLC program with the given arguments (all in textual representation) and cpu and memory budget (optional, in this order)
# Returns either computed UPLC value on success or thrown error on failure,
# logs generated through trace
# and the consumed cpu and memory steps
((suc, err), logs, (cpu, mem)) = uplc.eval("(program 1.0.0 (lam x x))", ["(con data #01)"], 1000000, None)

print((suc, err), logs, (cpu, mem))
# prints "('(con data #01)', None), [], (9907900, 13999500)"


### script_address.build_mainnet | script_address.build_test
# Compute the bech32 representations of a PlutusV2 script, based on the CBOR hex of the flat encoded script.
addr_mainnet = script_address.build_mainnet(code)
addr_testnet = script_address.build_testnet(code)

print(addr_mainnet)
# prints "addr1wx3x3tt88a9c44fxvv03w879v5ye98hzayq0yv4x7jhr0lc7pge2l"
print(addr_testnet)
# prints "addr_test1wz3x3tt88a9c44fxvv03w879v5ye98hzayq0yv4x7jhr0lc9fu996"

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

pyaiken-0.1.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyaiken-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (524.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pyaiken-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (524.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pyaiken-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (524.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pyaiken-0.1.1-cp38-cp38-manylinux_2_34_x86_64.whl (548.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

pyaiken-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (523.7 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file pyaiken-0.1.1.tar.gz.

File metadata

  • Download URL: pyaiken-0.1.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.9

File hashes

Hashes for pyaiken-0.1.1.tar.gz
Algorithm Hash digest
SHA256 071726fc0bf7b839fa39bd17e2b094dde799a3035f944f512a91f16b4c85b810
MD5 1bf360550e8c106cb754aeebb505993a
BLAKE2b-256 27395671a88560549b31044e0a0d28d889a989576550f22a5aa4c1f7e0677c81

See more details on using hashes here.

File details

Details for the file pyaiken-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyaiken-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2bc61be170379d5fc0ee2418844c67a8f368249616d135d75657a53964cb31d9
MD5 0d68cffbe5a6c66a7f90bb7a8fdf9a40
BLAKE2b-256 84ec37b1ff6a9fb63338afec6137219c499b16c097b0d3688f8136ff83ddc984

See more details on using hashes here.

File details

Details for the file pyaiken-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyaiken-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3d1bb5ebf3a22582b6433254435f1787689a6042fe4d391759544e63967e0d4b
MD5 78bbf0afdde731fabb36a862364f5fe6
BLAKE2b-256 f0640b7ed38007a0b8027a0f2e99b734c698937fed7e1d15ed26423acbc21c3b

See more details on using hashes here.

File details

Details for the file pyaiken-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyaiken-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 13700e40661e95a5072691ce9c57d2f1d85012f02b51d61ef93d9195e5e7141a
MD5 49bc22195575663e4b1fddbc310a6a8d
BLAKE2b-256 0d0a342a205a035d27ef165f568e33345da48fe06530041d9257df33d2a488a3

See more details on using hashes here.

File details

Details for the file pyaiken-0.1.1-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pyaiken-0.1.1-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6a36b69be98a739e9c25ca62e15530ba155b7d47b5a58be038de15580d673f8b
MD5 3e117155914fcf62428e52863aed2c84
BLAKE2b-256 dc70dd4fde7eaaa8c72a58754a735f88524da083c83951a52fcc910280edad36

See more details on using hashes here.

File details

Details for the file pyaiken-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyaiken-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f9cc2ee49c1f69d7f754d2bec44b0d768b7e15c093f8653109fa9725c26c55e8
MD5 7e382e193d567eae19d99fccdc51dac9
BLAKE2b-256 bec11a1aad93f8c186289040fb12897bc76ec342462dfbff7ddc006700c0dfd8

See more details on using hashes here.

Supported by

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