pytoniq-core-fork

raw JSON →
0.1.48 verified Fri May 01 auth: no python

A forked TON Blockchain SDK for Python, based on pytoniq-core. Supports TON address handling, ADNL, TL-B schemas, and Cell parsing. Version 0.1.48, updated for Python >=3.7. Maintained by ebellocchia.

pip install pytoniq-core-fork
error ModuleNotFoundError: No module named 'pytoniq_core'
cause Installed the wrong package name or didn't install at all.
fix
Run 'pip install pytoniq-core-fork' (not pytoniq_core-fork).
error AttributeError: module 'pytoniq_core' has no attribute 'Address'
cause Trying to import from wrong module or the fork uses different attribute names.
fix
Use 'from pytoniq_core import Address' as shown in the quickstart.
gotcha This is a fork, not the original pytoniq-core. Some API changes may exist. Check the fork's documentation if something doesn't work.
fix Use pytoniq-core-fork README as reference.
gotcha The library name in PyPI is pytoniq-core-fork, but the Python package is pytoniq_core. Install name differs from import name.
fix Install with 'pip install pytoniq-core-fork', then import as 'from pytoniq_core import ...'

Demonstrates creating a TON Address and constructing a Cell.

from pytoniq_core import Address, Cell, begin_cell

# Create an address
addr = Address('EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N')
print(addr)

# Build a cell
cell = begin_cell() \
    .store_uint(0, 32) \
    .store_address(addr) \
    .end_cell()
print(cell.hash.hex())