Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

leNFT/sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leNFT SDK

The leNFT SDK is a javascript package that wraps logic around the leNFT protocol. It allows developers to use leNFT as a backend for liquidity for their NFT projects.

To install:

npm i lenft-sdk

Example usage:

import leNFT from "lenft-sdk";	
let provider;

if (window.ethereum == null) {
    console.log("MetaMask not installed; using read-only defaults");
    provider = ethers.getDefaultProvider();
} else {
    console.log("MetaMask installed; using MetaMask provider");
    provider = new ethers.BrowserProvider(window.ethereum);
}

const lenft = new leNFT(provider);
const poolAddress = "0x...";
const buyQuote = await lenft.getBuyQuote(amount, poolAddress);
await lenft.buy(poolAddress, buyQuote.exampleNFTs, buyQuote.price);

An overview of the functionality is outlined in the docs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published