TON
Last updated
Last updated
The Open Network (TON) is a decentralized and open internet, created by the community using a technology designed by Telegram.
Install the wallet extension in your browser and create your wallet. Then export your recovery phrase by going to Settings > Recovery Phrase
. Enter your password and save your phrase.
You need a HTTP endpoint provider to access the TON network. We'll use the endpoint provided by for that.
Install the package in your project to get started.
Then create the SDK instance as follows:
You can connect your wallet using a mnemonic as follows:
You can get your wallet address as follows:
Now you can create a signed TON transfer transaction.
You can create multiple transfer transactions using the prepareTransfers
method.
You can remove your wallet and RPC connections as follows:
You can access the underlying TonJs objects to have more control over the transactions and interactions with the blockchain.
Here is a list of the objects you can access:
instance.provider
Provides read-only access to blockchain data
instance.signer
Allows for signing and broadcasting transactions
instance.wallet
Manages the private key and signing operations
Ton web JS client
The tx
will be a signed buffer that can be sent to a DEMOS node for broadcasting.
The DEMOS TON sdk is built on top of the library, and only provides a limited set of methods to interact with the TON blockchain.