- Install pip if you don't have it. guide.
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
rm get-pip.py
or
sudo apt update
sudo apt install python3-pip
- Install dependencies
python3 -m pip install python-dotenv;
python3 -m pip install buidl;
On some systems, requests is not installed by default. If you get "requests" not found error while running the client, run this:
python3 -m pip install requests;
sudo apt update
sudo apt install bzip2
- Clone repository, restore DB from last backup
git clone https://github.com/bestinslot-xyz/OPI-LC.git
cd OPI-LC/brc20/sqlite
wget http://s3.opi.network:9000/opi-light-client-files/db_4/light_client_brc20_sqlite_last.sqlite3.tar.bz2
tar -xvf light_client_brc20_sqlite_last.sqlite3.tar.bz2
rm light_client_brc20_sqlite_last.sqlite3.tar.bz2
- Run initialise_sqlite.py to initialise .env config
python3 initialise_sqlite.py
python3 brc20_light_client_sqlite.py
These steps are following the guide at here.
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=20
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs -y
cd OPI-LC/brc20/api; npm install;
Run initialise_api.py to initialise .env config
python3 initialise_api.py
node api.js