Skip to main content

📦 TON Core

TON Python Versions PyPI License Donate

Image

Downloads Downloads Downloads

Python core for TON Blockchain

Primitives, data types, TLB schemas, contract tools, and crypto utilities for TON.

Based on pytoniq-core by Maksim Kurbatov

Features

  • Primitives — core data types for cells, addresses, slices, and hash maps
  • TLB Schemas — transactions, blocks, accounts, and config parameters
  • Contracts — wallets, jettons, NFTs, DNS, Telegram, and Storage
  • Crypto — mnemonics, keys, signing, and encryption
  • Utilities — conversion, encoding, and helpers

Installation

pip install ton-core

Usage

from ton_core import Address, begin_cell, cell_to_b64, to_nano

# Parse a TON address
destination = Address("UQCZq3_Vd21-4y4m7Wc-ej9NFOhh_qvdfAkAYAOHoQ__Ness")

# Convert TON to nanotons
amount = to_nano("0.5")

# Build a message body
body = begin_cell()
body.store_uint(0, 32)
body.store_string("Hello from ton-core!")
cell = body.end_cell()

# Serialize to base64
payload = cell_to_b64(cell)

More examples available in pytoniq-core/examples.

License

This repository is distributed under the MIT License.

Metadata

Release files for ton-core 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ton-core 0.6.1
File Size Uploaded
ton_core-0.6.1.tar.gz 82.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ton-core 0.6.1
File Interpreter ABI Platform
ton_core-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 189.5 kB

Release files / ton_core-0.6.1.tar.gz

Download URL ton_core-0.6.1.tar.gz
Size 82.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9c538da83afee957b6b7350a21956b3fe536bdce16f4cbb282c2e8fd5df9b77e
BLAKE2b-256 checksum
How to use checksums
b2ba9a31ce55d469a1bb72c22f2301f1f62feca8a9a2da6a5f2c161d8db5d129
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / ton_core-0.6.1-py3-none-any.whl

Download URL ton_core-0.6.1-py3-none-any.whl
Size 106.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46666a57c91b3a3c40934df5864b7ca6c14a3dac07173f82267c991b5f3f28a0
BLAKE2b-256 checksum
How to use checksums
930df19102fb2c5e059cfb5b5c78d0b806cd849695c7461af3bd317358d86c7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.7.1

2 release files

0.7.0

2 release files

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page