@tonx/adapter
v2.0.7
Published
The TONX.js Adapter allows for an easy transition from popular TON client libraries like [@ton/ton](https://github.com/ton-org/ton), [TonWeb](https://github.com/toncenter/tonweb), and [TonClient4](https://github.com/ton-org/ton/blob/master/src/client/TonC
Downloads
449
Readme
@tonx/adapter
The TONX.js Adapter allows for an easy transition from popular TON client libraries like @ton/ton, TonWeb, and TonClient4. With minimal code changes, you can migrate your project to the TONX API effortlessly.
Already using existing TON APIs like Ton Center? Migrate to TONX API effortlessly.
P.S. Our RESTful migration API is also coming soon—contact us if you'd prefer to migrate that way.
Features
- Integration with TONX.js SDK (@tonx/core)
- Compatibility with @ton/ton, TonWeb, and TonClient4
- JSON-RPC method powered by the TONX Supernode with 99.99% uptime, precise indexing, and ultra-low latency
- Full coverage of TONX API endpoints
Usage
Before using it, you will need to get a key from TONX API.
ton/core
import { ToncoreAdapter } from "@tonx/adapter";
const client = new ToncoreAdapter({
network: "mainnet",
apiKey: "YOUR_API_KEY",
});
tonweb
import { TonWebAdapter } from "@tonx/adapter";
const client = new TonWebAdapter({
network: "mainnet",
apiKey: "YOUR_API_KEY",
});
TonClient4
import { TonClient4Adapter } from "@tonx/adapter";
const client = new TonClient4Adapter({
network: "mainnet",
apiKey: "YOUR_API_KEY",
});