Run with Node.js
This tutorial walks you through setting up and running a local blockchain with a single block producer using the XYO Layer One Protocol. This guide will have you use the command line to create and pre-fund a test wallet, run a block producer, and simulate transactions using locally generated test tokens. This setup is fully self-contained and requires no access to the external testnet, "Sequence".
It’s a great starting point for developers looking to:
Explore how XL1 handles smart contract interactions
Understand the local development experience before deploying to public infrastructure
Test without spending real tokens or revealing production credentials
Prerequisites
Before you begin, make sure you have the following installed:
Node.js version 22 or higher
Google Chrome browser
Download Google Chrome if needed
Yarn
Basic knowledge of Terminal / Command Line
Run the Sample
Clone the Sample Repository
git clone https://github.com/XYOracleNetwork/xl1-samples-nodejs
cd xl1-samples-nodejsInstall Dependencies
Start the Sample
This command immediately triggers two important things:
It launches a local blockchain with a single block producer
It generates a unique test wallet and outputs a seed phrase (mnemonic)
It will output something that looks like the following:

The next section will say something like the following:

This is the genesis block is the first block your block producer is creating. Once it is created, you've created your own fully local and sovereign XYO Layer One Blockchain! This genesis block also gives your producer wallet address the initial block reward for starting the chain, which becomes the tokens you can spend for transactions.
Any blocks you create will not be on the Testnet "Sequence", but instead on your local blockchain.
Once your block producer is ready, your first transaction occurs:

Complete a Test Transaction
A transaction is created for you, is added to a created block, and is added to your blockchain.
The process goes:
The Wallet creates and signs the transaction.
The signed transaction is submitted to your local producer, which is already running.
The local producer includes the transaction in a newly created block.
This block is then added to your new local XYO Layer One Blockchain and viewable via the Explorer.
You may see a few attempts at this stage, like the example below:

Successful Transaction
Once the transaction is successful, you can view it on Explore using the link provided in the command line.
You’ll be able to:
View the transaction hash
See your wallet address as the sender
Confirm the signature
Verify the block ID that includes your transaction
Optionally see reward-related metadata (even if reward = 0)
Last updated