Skip to content

hey-researcher/tonlib-multiclient

 
 

Repository files navigation

TONlib Multiclient

The TONlib Multi Client is crafted with modern C++ to serve as a robust and flexible tool for seamless communication with multiple TON blockchain lite servers. It's engineered for efficiency, allowing for streamlined request handling across a diverse array of server endpoints.

Features

  • Multi-threaded Design: Enhances the ability to handle concurrent connections and requests efficiently.
  • Flexible Request Handling: Supports a variety of request types, ensuring robust interaction with blockchain lite servers.
  • Dynamic Request Creation: Allows for the creation of customizable requests, enabling tailored blockchain queries and operations.
  • Advanced Configuration Options: Offers detailed settings for requests, including server selection and archival data queries, providing users with control over their blockchain interactions.

Requirements

  • CMake: Version 3.15 or newer.
  • C++ Compiler: Must support the C++20 standard or more recent.
  • Python: Version 3.9 or above is required for utilizing Python bindings.

Usage

Examples could be found in the examples directory.

Building

mkdir build
cd build
cmake ..
cmake --build .

Build with Python bindings, pass -DPY_TONLIB_MULTICLIENT:BOOL=TRUE to CMake:

cmake -DPY_TONLIB_MULTICLIENT:BOOL=TRUE ..
cmake --build .

To use built python binding you need to copy tonlib_multiclient dynamic lib (.so) from build/py directory to your python project.

cp build/py/tonlib_multiclient.so /path/to/your/python/project

Requests

Request

This structure is suitable for general request operations where the response type is known and directly utilized.

RequestFunction

A specialized version of Request for cases where TonlibClient::make_request cannot process the request (raw_getAccountState etc).

RequestCallback

Designed for advanced use cases where the user must initialize and manage the response through your own global callback. Requires explicit setup for callback handling.

RequestJson

Enables sending requests in raw JSON format, requiring minimal configuration besides the JSON string itself and the standard request parameters.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.9%
  • CMake 4.4%
  • Shell 1.7%