Back to Tutorials
Beginner15 min

Setting Up Development Environment

Install Node.js, SDK, and create your first project

Setting Up Development Environment

In this tutorial, you'll learn how to set up your development environment for building on the Beatoz blockchain.

Prerequisites

Before you begin, make sure you have Node.js 18+ installed on your machine.

Step 1: Install Node.js

First, you need to install Node.js. We recommend using version 18 or higher.

# Using Homebrew
brew install node@18

Verify installation:

node --version  # v18.x.x
npm --version   # 9.x.x

Step 2: Create a New Project

Create a new directory for your project and initialize it:

mkdir my-beatoz-app
cd my-beatoz-app
npm init -y

Step 3: Install Beatoz SDK

Install the @beatoz/web3 package:

npm install @beatoz/web3

TypeScript Support

The SDK includes TypeScript type definitions out of the box!

Step 4: Create Your First Script

Create a file called index.js:

const { Web3 } = require('@beatoz/web3');

// Connect to Beatoz Testnet
const web3 = new Web3('https://rpc-testnet0.beatoz.io');

async function main() {
  // Get network status
  const status = await web3.beatoz.status();
  console.log('Connected to:', status.node_info.network);
  console.log('Latest block:', status.sync_info.latest_block_height);
}

main().catch(console.error);

Step 5: Run Your Script

Testnet
node index.js

You should see output like:

Connected to: 0xbea701
Latest block: 1234567

Congratulations!

You've successfully set up your Beatoz development environment!

Next Steps

Beatoz Developer Portal