RLR-GitHub / lnft

Liquid NFT Platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  • User accounts and profiles for artists and collectors include custom avatars, contact info and biography
  • Users can follow other artists and collectors and like/favorite individual artworks
  • Artists can upload digital media files (jpg, png, gif, mp4) representing an artwork and add metadata like a title, description, and tags
  • Selected metadata is published in the liquid asset registry so that tokens can be recognized by external wallets
  • Media files are added to the IPFS network upon being uploaded and are given a unique content identifier (CID) derived from the SHA256 hash of the file
  • The CID is embedded in the Liquid token issuance transaction contract, permanently and provably linking the file to the token
  • Artworks are listed in a searchable/sortable/filterable marketplace gallery
  • Artists can list an artwork for sale by setting an optional listing price, royalty rate, and/or auction period
  • Bids and sales are conducted peer-to-peer using atomic swaps so the platform host does not need to escrow funds
  • Listings, bids, transfers and new artwork activity are logged and presented in a site-wide feed
  • A web-based liquid wallet is integrated into the user's profile page and allows them to fund their accounts with L-BTC or any kind of liquid asset
  • Wallets can be backed up and imported using a 12-word BIP mnemonic seed phrase
  • Built-in integration with the coinos.io API allows users to instantly convert BTC to L-BTC by depositing to an on-chain address or paying a lightning network invoice
  • Royalties and auction holding periods are enforced through a 2-of-2 signing server that only signs off on transactions that meet certain conditions

Tech stack summary

Front-end

Back-end

3rd-party APIs:

Installation pre-requisites

Install

git clone https://github.com/liquidnft/lnft
cd lnft
yarn
cd hasura
cp .env.sample .env
docker-compose up -d
hasura migrate apply
hasura metadata apply
hasura seeds apply
sudo cp ../static/user.png storage
docker exec -it ipfs ipfs add /export/user.png
docker restart app
cd ..
yarn 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>

Build for production

yarn build
yarn adapt

About

Liquid NFT Platform

License:MIT License


Languages

Language:Svelte 51.7%Language:JavaScript 18.3%Language:CSS 13.7%Language:Handlebars 6.9%Language:PLpgSQL 6.3%Language:EJS 1.8%Language:Shell 0.6%Language:HTML 0.6%Language:Dockerfile 0.1%