
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@orbs-network/ton-gateway
Advanced tools
Unthrottled anonymous RPC access to TON blockchain via a robust decentralized network
Unthrottled anonymous RPC access to TON blockchain via the dozens of decentralized nodes of the Orbs Network.
Access a network of public API endpoints that allow TON dapp clients to make HTTP queries from the browser to TON blockchain (call getters, balances, get block data, etc). Access is unrestricted without an API Key and without requiring dapps to run any backend.
Supports all popular RPC protocols:
npm install @orbs-network/ton-gateway
import { TonClient, Address } from "ton";
import { getHttpEndpoint } from "@orbs-network/ton-gateway";
const endpoint = await getHttpEndpoint(); // get the decentralized RPC endpoint
const client = new TonClient({ endpoint }); // initialize ton library
// make some query to mainnet
const address = Address.parseFriendly("EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N").address;
const balance = await client.getBalance(address);
import TonWeb from "tonweb";
import { getHttpEndpoint } from "@orbs-network/ton-gateway";
const endpoint = await getHttpEndpoint(); // get the decentralized RPC endpoint
const tonweb = new TonWeb(new TonWeb.HttpProvider(endpoint)); // initialize tonweb library
// make some query to mainnet
const balance = await tonweb.getBalance("EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N");
import { TonClient4 } from "ton";
const endpoint = await getHttpEndpoint({ protocol: "ton-api-v4" });
const client4 = new TonClient4({ endpoint });
let latest = await client4.getLastBlock();
console.log(latest.last.seqno);
<script src="https://cdn.jsdelivr.net/gh/orbs-network/ton-gateway@1.1.1/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/toncenter/tonweb/dist/tonweb.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
TonGateway.getHttpEndpoint().then((endpoint) => { // get the decentralized RPC endpoint
const tonweb = new TonWeb(new TonWeb.HttpProvider(endpoint)); // initialize tonweb library
// make some query to mainnet
tonweb.getBalance("EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N").then((balance) => {
console.log(balance);
});
});
});
</script>
Use testnet instead of mainnet:
const endpoint = await getHttpEndpoint({
network: "testnet" // specify "sandbox" for the second ton testnet
});
interface Config {
network?: "mainnet" | "testnet" | "sandbox" // default: mainnet
protocol?: "toncenter-api-v2" | "ton-api-v4" | "adnl-proxy" // default: toncenter-api-v2
host?: string // default: "ton.gateway.orbs.network"
version?: number // default: 1
format?: "default" | "json-rpc" | "rest"; // default: "default"
};
const endpoint = await getHttpEndpoint(config: Config);
network
- override which TON network do you want to use:
mainnet
- TON mainnet (default)testnet
- (supported only in toncenter-api-v2) the first TON testnetsandbox
- (supported only in toncenter-api-v2) the second TON testnet created by TON whales and used by TonHub
protocol
- override the RPC protocol you want to use:
toncenter-api-v2
- TonCenter HTTP API v2 (replaces the https://toncenter.com/api/v2/jsonRPC endpoint)ton-api-v4
- TonHub HTTP API v4 (replaces the https://mainnet-v4.tonhubapi.com endpoint)adnl-proxy
- Raw ADNL Proxy
format
- how to build the endpoint, default is per protocol
default: /
rest: /
json-rpc - not supported
No throttling for anonymous users
RPC gateways like https://toncenter.com/api/v2/jsonRPC throttle anonymous users to 1 request per second. Most dapps cannot operate under these restrictions since their users are anonymous. The Orbs Network endpoints are designed to serve anonymous dapp users and will not restrict your users from using your dapp client.
No need for registering an API Key
RPC gateways like https://toncenter.com/api/v2/jsonRPC reduce user throttling by requiring you to register an API Key. This API Key cannot be stored client-side since it can be abused (it's supposed to be a secret) and dapps should not run a centralized backend to store this secret since they should be decentralized.
No need to run your own RPC backend
If you're building a dapp, your dapp should be decentralized so it can be trustless. If you're running your own centralized backend as part of your dapp, you've made your dapp centralized. If your backend suffers downtime for example, your users will lose access to their funds. If the infrastructure is decentralized, you don't need to worry about it.
Decentralized access to the chain
By relying on https://toncenter.com/api/v2/jsonRPC, you're relying on a centralized business (toncenter.com), not a protocol. The Orbs Network TON Gateway is a decentralized protocol operated by dozens of independent nodes that are all part of the Orbs Network. The network mainnet is running since 2019 and validators are staked with Proof-of-Stake consensus with over $100 million TVL locked. The network is extremely robust against downtime due to the number of independent nodes.
FAQs
Unthrottled anonymous RPC access to TON blockchain via a robust decentralized network
The npm package @orbs-network/ton-gateway receives a total of 3 weekly downloads. As such, @orbs-network/ton-gateway popularity was classified as not popular.
We found that @orbs-network/ton-gateway demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.