tokenocean / maven

MIT License
0 stars 3 forks source link

LNFT

LNFT is a web-based platform for issuing and transacting with non-fungible tokens on the Bitcoin Liquid Network. Blockstream is sponsoring its development and hosting an exemplary curated instance of it for use by Bitcoin artists at Raretoshi.

The plan is to separate out any Raretoshi-specific features from the core platform functionality so that anyone can adapt the platform to host their own Liquid-based NFT site but that's currently a work in progress

Features

Tech stack summary

Front-end

Back-end

3rd-party APIs:

Installation pre-requisites

Setup local development environment

git clone https://github.com/liquidnft/lnft
cd lnft
pnpm install
cd hasura
cp .env.sample .env
docker run -it -v $PWD/app:/app --entrypoint pnpm asoltys/lnft-server install
docker-compose up -d
hasura migrate apply
hasura metadata apply
hasura seeds apply
hasura metadata reload
sudo cp ../static/user.png storage
docker exec -it ipfs ipfs add /export/user.png
docker restart lapp
cd ..
pnpm dev   # site is available at http://localhost:3000/

Setup local development with cloud tools - VS CodeSpaces https://vscode.dev

 npm i -g pnpm
 pnpm install
 curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash
 cd hasura
 cp .env.sample .env
 docker run -it -v $PWD/app:/app --entrypoint pnpm asoltys/lnft-server install
 docker-compose up -d
 hasura migrate apply
 hasura metadata apply
 hasura seeds apply
 hasura metadata reload
 sudo cp ../static/user.png storage
 docker exec -it ipfs ipfs add /export/user.png
 docker restart lapp
 cd ..
 pnpm dev   # site is available at http://localhost:3000/

Regtest mining

Mine some blocks to get the electrs API server warmed up

chmod +x mine.sh
./mine.sh   # run in a separate tab

Fund a wallet with regtest coins

Get a deposit address from the wallet page or users table in the db and send an amount with this command

docker exec -it liquid elements-cli -datadir=/config sendtoaddress <address> <amount>