Baklava Testnet

Install Dependencies

//install python
sudo apt update && sudo apt upgrade -y
sudo apt install python3 

//if python not installed, use deadsnakes PPA to install with code below
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3
sudo apt install python3-pip

//install git
sudo apt install git 

//add and setup docker repository
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
sudo mkdir -m 0755 -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  
//install docker
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Download Naruno cli

// please choose version, use one.
// it's pip version
pip install naruno

// it's docker version
docker pull ghcr.io/naruno/cli:latest

Test Environment

// download
mkdir test_enviroment
cd test_enviroment
git clone https://github.com/Naruno/Naruno.git

// install
pip3 install naruno-tests

Create Wallet

// make sure you change the "password" to any password you want to use for yout wallet
narunocli --createwallet password

// print wallet address
narunocli --printwallet

// backup wallet
narunocli --narunoexport

// switch to wallet number 1 (not 0)
narunocli --wallet your_wallet_id_from_printwallet

Import wallet

narunocli --narunoimport your_zip_location

**need to use full path of zip location, example: /root/naruno/.naruno/wallet-00001.zip

Upgrade

pip3 install naruno --upgrade

Connect to baklava network

narunocli --baklavaon

Check Balance

narunocli --getbalance

If your balance is smaller from 0 you should check your other wallets. For viewing other wallets you should use narunocli --printwallet and after you should switch to other wallet via narunocli --wallet your_wallet_id_from_printwallet

Creating Web3_App.py

Please use this code for creating a Web3 application in 4 lines.

from naruno.apps.remote_app import Integration

integration = Integration("Your_App_Name", password="Your_Wallet_Password")

integration.send("Your_Action_Name", "Your_Data", "Recipient_Address")

print(integration.get())

integration.close()

Adding Amount

If you want to add amount to your transaction you can use integration.send("Your_Action_Name", "Your_Data", "Recipient_Address", amount=100) function. The amount is in Naruno coins. You can check your balance via narunocli --getbalance command.

Running

With this command you will send an data to an recipient and after a while (tx validation proccess) you will get your sent datas and the datas that came to you.

python Web3_App.py

Last updated