How to develop under the TON using Javascript

chakzefir

chakzefir

Posted on September 3, 2022

How to develop under the TON using Javascript

This was originally posted on stackoverflow, but was later removed by the moderators because they called it a recommendation.

I thought, ok, if it considered as a recommendation I should not throw it out. I do see value in it, why not to post it here. In the hope, that it might help someone.


Tiny disclaimer about what is TON

TON (The Open Network) is a layer 1 blockchain, originally designed by Nikolay Durov and the Telegram team, now being created by the open community. It has all the potential to include all other blockchains under one roof and and change the rules of the game in the way people set up contracts with each other.To learn more, I recommend checking out the analysis, where it compares to other chains.


Question

As Javascript developer, I'm curious how to bootstrap and start working with TON blockchain without any knowledge of Func. Could you recommend any SDK, libraries and/or examples?

Answer

It depends on how you want to interact with the TON blockchain.

๐Ÿ“ฅ I just need to get some info from the blockchain

Then it would be enough just to use HTTP API. There are several open APIs which you could use:

You can find more detailed and up-to-date information about the API in dev docs: https://ton.org/docs/#/apis/

๐Ÿงพ I not only need to get information, but also publish (maybe even smart contracts)

Every community discussion will advise you to use Func, and they will be right. Simply because it is a native language for dealing with data structures and abstractions, which was originally designed for smart contracts in TON. It seems complicated, but only when you first start. Try out the first part of step by step first contract on Func.

But we're talking about Javascript in this thread, so here's a list of available JS SDKs:

All of the tools listed are open source, so you can contribute.

๐Ÿง  I'm ready to learn something new, but Func is too complicated. How about Solidity?

I can understand you. Unfortunately, because of the actor model and some other key concepts, it's impossible to use Solidity to write smart contracts for TON.

Fortunately, several enthusiasts are now working on Tact-lang, which should be much easier to understand and use. You can already use it for learning now, and then share feedback and contribute.

๐Ÿ’– ๐Ÿ’ช ๐Ÿ™… ๐Ÿšฉ
chakzefir
chakzefir

Posted on September 3, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

ยฉ TheLazy.dev

About