Skip to content

ton-python/ton-core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 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, and Telegram
  • 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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%