Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Unanswered
How do I get an RPC endpoint for TON?


TLDR

For most cases https://www.orbs.com/ton-access is a good solution for getting unthrottled and decentralized RPC access

It also has convenient JS API:

import { getHttpEndpoint } from "@orbs-network/ton-access";
import { TonClient } from "ton";

// get the decentralized RPC endpoint
const endpoint = await getHttpEndpoint(); 

// initialize ton library
const client = new TonClient({ endpoint });

Longer answer

It depends on your use-case. There are three primary use-cases for using RPC:

  1. You want to experiment as a developer, learn and play. You will make a small number of calls. For this TON Access is probably the best because you don't need to register and it's reliable.

  2. You're building a production dapp and your web client needs to make RPC calls like calling getters. For this TON Access is the best because that's why it was made. Your dapp users are anonymous and this is the only service that will not throttle them by declaration since they don't have API keys.

  3. You build a production backend that needs to make many calls to the chain. For example, you build an indexing service that shows all holders of a Jetton so to index the data in your backend you need RPC. For this TON Access is not good at all and you're better with services like TonCenter or TonApi. These services will require that you register an API key which makes sense since you're a heavy user.

Don't run your own RPC

If you're building a centralized service then run your own RPC. But if you're building a decentralized service like a dapp, relying on a server that you run by yourself is too centralized and considered bad practice.

Be aware of multiple RPC protocols

Unlike Ethereum, TON doesn't have a single RPC protocol that everybody uses. There are currently 3 different RPC protocols people use:

  1. HTTP API V2 created by TonCenter
  2. HTTP API V4 created by TonWhales
  3. Raw ADNL over HTTP

TON Access is curently the only RPC providers that support all 3 protocols.

Please note that TonApi is a centralized indexed service and not RPC. For decentralized apps you need your blockchain queries to be routed to full nodes or validator nodes. This doesn't happen with TonApi since it has special indexes that TON full nodes and validator nodes don't support.

Disclosure

I helped build TON Access. The reason I built it because there was no decentralized RPC provider for dapps in the ecosystem and I think such a thing is important.

5
5
Posted one year ago
Edited one year ago
Tal Kol
359 × 3 Administrator
  
  

Thanks @<1485644594262577152|Tal Kol> for clarify!

Howard   one year ago Report
600 Views
0 Answers
one year ago
one year ago