Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

📦 TON Core

TONPython VersionsPyPILicenseDonate

Image

DownloadsDownloadsDownloads

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, and Telegram
  • Crypto — mnemonics, keys, signing, and encryption
  • Utilities — conversion, encoding, and helpers

Installation

pip install ton-core

Usage

fromton_coreimportAddress, begin_cell, cell_to_b64, to_nano# Parse a TON addressdestination=Address("UQCZq3_Vd21-4y4m7Wc-ej9NFOhh_qvdfAkAYAOHoQ__Ness")
# Convert TON to nanotonsamount=to_nano("0.5")
# Build a message bodybody=begin_cell()
body.store_uint(0, 32)
body.store_string("Hello from ton-core!")
cell=body.end_cell()
# Serialize to base64payload=cell_to_b64(cell)

More examples available in pytoniq-core/examples.

License

This repository is distributed under the MIT License.

About

Python core for TON Blockchain — primitives, data types, and utilities.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages