Writing to the network
In the previous section, you learned how to read data from the TON Blockchain. Now, let's explore how to write data to it.
Introduction
This guide will walk you through writing data to TON Blockchain. You'll learn how to:
- Make transactions
- Transfer TON/NFTs
Set up environment
First, visit the installation pages and install Node.js and npm for your OS. Check that the installation is correct by running the following commands:
node -v
npm -v
Versions of node
and npm
should be at least v20
and v10
correspondingly.
Project setup
Let's set up our project structure:
- Create a new directory for your project
- Initialize a Node.js project
- Install the required dependencies
Run these commands in your terminal:
mkdir writing-to-ton && cd writing-to-ton # create new directory and cd to it
npm init -y # initialize Node.js project
npm install typescript ts-node @ton/ton @ton/core @ton/crypto #install required dependecies
npx tsc --init # initialize typesctipt