Skip to content

Nate8888/xluxopen

Repository files navigation

xLux - Decentralized Knowledge Exchange

xLux is a decentralized knowledge exchange platform that enables creators and communities to grow, engage, and improve by providing an easy way to exchange “Knowledge NFTs” containing exclusive content such as techniques, strategies, theories, and experiences.

Table of Contents


Features

  • Mint, Sell, Purchase, Cancel and Exchange NFTs in the Ripple Ledger using the latest XLS-20 standard
  • Check the latest offers and bids for NFTs with all addresses registered
  • Sign & Submit transactions asyncronously
  • Decentralized file storage system using IPFS & NFT.Storage
  • Simulate Account Generation and Transaction Execution
  • Easy to use API for implementing the XLS-20 standard in a python script

Getting Started

To first get started with the functional demo, you need to clone the project using git.


1. git clone https://github.com/Nate8888/xluxopen.git

Now go inside the project folder xluxopen and run the following command to install the dependencies (python 3+ required)


2. pip install -r requirements.txt

Now you have to create an NFT.Storage account and put the API Key in the .env file.


3. IPFS_KEY=KEY_HERE

Now you can run the following command to fire up the demo.


4. python3 xluxApiDemo.py

A request creator tool like CURL, Postman, or Swagger can be used to experiment with the API.


API

Reset Wallets

All API requests interact with NFT-Devnet wallets that are currently stored in memory. You are able to change the default wallets in the API and you are also able to generate complete new ones throughout the demo.


Sets the account for the NFT issuer:

POST /set_seller_account

Body Parameter:

{
    "secret": "NFT-Devnet-Secret"
    "sequence": "NFT-Devnet-Sequence"
    "address": "NFT-Devnet-Address"
}

Sets the account for the NFT Buyer:

POST /set_buyer_account

Body Parameter:

{
    "secret": "NFT-Devnet-Secret"
    "sequence": "NFT-Devnet-Sequence"
    "address": "NFT-Devnet-Address"
}

Generate two random accounts to act as the NFT issuer and buyer:

POST /generate_accounts

Mint NFT

Mint an NFT to the NFT issuer's account.


POST /mint

Form Parameter:

    "name": "NFT-Name"
    "description": "NFT-Description"
    "sellprice": "NFT-Sell-Price"

File Parameter:

    "files[]": "NFT-Image"

Sell NFT

Sell an NFT to the NFT buyer's account.


POST /sell-nft

Form Parameter:

    "NFTokenID": "NFT-Token-ID"
    "sellprice_in_xrp": "NFT-Sell-Price"

Buy NFT

Buy an NFT from the NFT issuer's account.


POST /buy-nft

Form Parameter:

{
    "NFTokenID": "NFT-Token-ID",
    "buyprice_in_xrp": "NFT-Buy-Price"
}

Accept Buy Offer

Accept a buy offer for an NFT.


POST /accept_buy_offer

Form Parameter:

{
    "buy_offer_index": "NFT-Buy-Offer-Index"
}

Accept Sell Offer

Accept a sell offer for an NFT.


POST /accept_sell_offer

Form Parameter:

{
    "sell_offer_index": "NFT-Sell-Offer-Index"
}

Cancel Buy Offer

Cancel a buy offer for an NFT.


POST /cancel_buy_offer

Form Parameter:

{
    "buy_offer_index": "NFT-Buy-Offer-Index"
}

Cancel Sell Offer

Cancel a sell offer for an NFT.


POST /cancel_sell_offer

Form Parameter:

{
    "sell_offer_index": "NFT-Sell-Offer-Index"
}

Get NFT Data from IPFS

Get NFT data from IPFS.


GET /get-nft-data-ipfs

Query Parameter:

{
    "url": "ipfs.io/ipfs/<hash>/metadata.json"
}

List Account NFTs

List all NFTs in an account.


GET /list-acc-nfts

List Account NFT Offers

List all sell offers in a NFT.


GET /list-acc-sell-nft-offers

Form Parameter:

{
    "NFTokenID": "NFT-Token-ID"
}

List Account NFT Buy Offers

List all NFT buy offers in an account.


GET /list-acc-nft-buy-offers

Form Parameter:

{
    "NFTokenID": "NFT-Token-ID"
}

List All xLux Accounts

List all accounts registered in the xLux platform.


GET /list-all-xlux-accs

List All NFTs in xLux

List all NFTs in the xLux platform.


GET /list-all-nfts-in-xlux

List All NFT Offers in xLux

List all NFT offers in the xLux platform.


GET /list-all-nft-offers-in-xlux

Append Address to Database

Append an address to the database.


POST /append-add-to-db

Body Parameter:

{
    "address": "NFT-Devnet-Address"
}

About

Project for XRPL Grant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published