lenft-sdk

1.0.8 • Public • Published

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.

Package Sidebar

Install

npm i lenft-sdk

Homepage

lenft.fi

Weekly Downloads

4

Version

1.0.8

License

ISC

Unpacked Size

285 kB

Total Files

7

Last publish

Collaborators

  • lenft