Tonutils is a high-level, object-oriented Python library designed to facilitate seamless interactions with the TON blockchain.
Project description
📦 Tonutils
Tonutils is a high-level, object-oriented Python library designed to simplify interactions with the TON blockchain. It seamlessly integrates several prominent services for working with TON:
-
RPC API
- tonapi.io – REST API to the TON blockchain explorer.
- toncenter.com – fast and reliable HTTP API for The Open Network.
- quicknode.com – low-latency HTTP API access to TON via global infrastructure.
- tatum.io – RPCs and APIs powering Web3. Fast, reliable, affordable.
-
Native ADNL
- pytoniq – library for direct interaction with Lite servers.
By combining these services, Tonutils provides a powerful and flexible toolset for developers, making it easier to build on top of the TON ecosystem.
Installation
pip install tonutils
To use pytoniq with Native ADNL connection, install it with the optional dependencies, including
the pytoniq library:
pip install 'tonutils[pytoniq]'
Donations
Your donation supports the future of this project. Every contribution helps stimulate innovation and sustain development!
TON - UQCDrgGaI6gWK-qlyw69xWZosurGxrpRgIgSkVsgahUtxZR0
USDT (TRC-20) - TGKmm9H3FApFw8xcgRcZDHSku68vozAjo9
Usage
Providers
-
RPC API
tonapi To use you need to obtain an API key on the tonconsole.com.
Client Initialization
from tonutils.client import TonapiClient API_KEY = "your api key" IS_TESTNET = True client = TonapiClient(api_key=API_KEY, is_testnet=IS_TESTNET)
toncenter To use you need to obtain an API key from the bot.
Client Initialization
from tonutils.client import ToncenterV2Client from tonutils.client import ToncenterV3Client API_KEY = "your api key" # optional IS_TESTNET = True # Using Toncenter V3 client client_v3 = ToncenterV3Client(api_key=API_KEY, is_testnet=IS_TESTNET) # If you want to use Toncenter V2 instead: # client_v2 = ToncenterV2Client(api_key=API_KEY, is_testnet=IS_TESTNET)
quicknode To use, obtain an API URL from quicknode.com.
Note: QuickNode does not support testnet.
Client Initialization:
from tonutils.client import QuicknodeClient HTTP_PROVIDER_URL = "https://blissful-withered-surf.ton-mainnet.quiknode.pro/d6e8...1964" client = QuicknodeClient(HTTP_PROVIDER_URL)
tatum To use it, you need to obtain an API key on tatum.io.
Client Initialization
from tonutils.client import TatumClient API_KEY = "your api key" IS_TESTNET = True client = TatumClient(api_key=API_KEY, is_testnet=IS_TESTNET)
-
Native ADNL
pytoniq For better performance, pass your own config, available from the bot.
Client Initialization:
from tonutils.client import LiteserverClient config = {} # your own config IS_TESTNET = True client = LiteserverClient(config=config, is_testnet=IS_TESTNET)
Guide
Getting Testnet Assets
-
TON:
Obtain free testnet TON by interacting with the official bot:
Open Bot -
NOT Jettons (9 decimals):
Claim testnet NOT by scanning the QR code at the following link:
Scan to Claim Testnet NOT -
USD₮ Jettons (6 decimals):
Claim testnet USD₮ by scanning the QR code at the following link:
Scan to Claim Testnet USD₮
Ton Connect Integration
Wallet Operations
-
Standard Wallet
-
Highload Wallet
-
Preprocessed Wallet
-
DEX DeDust.io
-
DEX STON.fi
Jetton Operations
-
Mintless Jetton (e.g. Hamster)
-
Standard Jetton
-
Stablecoin Jetton (by Notcoin)
-
DEX DeDust.io
-
DEX STON.fi (v1)
-
DEX STON.fi (v2)
NFT Operations
-
Editable NFTs
-
Soulbound NFTs
-
Standard NFTs
-
Marketplace Getgems.io
DNS Operations
-
Subdomain Collection
-
Simple Subdomain Manager
Vanity Operations
Contribution
We welcome your contributions! If you have ideas for improvement or have identified a bug, please create an issue or submit a pull request.
Support
Supported by TON Society, Grants and Bounties program.
With special thanks to Igroman787 for the support.
License
This repository is distributed under the MIT License. Feel free to use, modify, and distribute the code in accordance with the terms of the license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tonutils-0.3.6.tar.gz.
File metadata
- Download URL: tonutils-0.3.6.tar.gz
- Upload date:
- Size: 93.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93741045db3be4a7a663b29fb9828c9437c16463d494d2d63fef407ed01dbc83
|
|
| MD5 |
b6e254d0dacb90234c5a9793a2abbd1a
|
|
| BLAKE2b-256 |
1bcd8c2c1f181ff74de1bbd7fee647df720bd0667203630b97a0b5584d6e6278
|
File details
Details for the file tonutils-0.3.6-py3-none-any.whl.
File metadata
- Download URL: tonutils-0.3.6-py3-none-any.whl
- Upload date:
- Size: 136.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5282bbb76a28ff81102c22ab587659b08f267e2882d9d38c05b8ad2bb25506fa
|
|
| MD5 |
1154fb7387be19d61c5e2b3f03e56105
|
|
| BLAKE2b-256 |
3a0813a3f90418a936c3f7a538a4525f1d790148f90d9376a0b733a580ac4f28
|