1.0.8 • Published 2 years ago

lenft-sdk v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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.

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago