NiftyKit DropKit SDK Library.
Install via npm or yarn
# with npm
npm install @niftykit/dropkit
# with yarn
yarn add @niftykit/dropkit
Or use it via CDN
<script async src='https://unpkg.com/@niftykit/dropkit/dist/umd/index.js'></script>
// using ethers.js
import { ethers } from 'ethers';
import DropKit from '@niftykit/dropkit';
const provider = new ethers.providers.Web3Provider(window.ethereum, 'any');
await provider.send('eth_requestAccounts', []);
const signer = provider.getSigner();
const drop = await DropKit.create(signer, 'YOUR-SDK-KEY');
// mint 1 NFT
await drop.mint(1);
class DropKit {
contract: DropCollection;
signerOrProvider: Signer | Provider;
dropCollectionId: string;
isDev?: boolean;
chainId?: number;
networkName?: string;
static create(signerOrProvider: Signer | Provider, key: string, isDev?: boolean): Promise<DropKit | null>;
static getCollectionData(key: string, isDev?: boolean): Promise<DropApiResponse & ErrorApiResponse>;
price(): Promise<BigNumber>;
maxAmount(): Promise<BigNumber>;
maxPerMint(): Promise<BigNumber>;
maxPerWallet(): Promise<BigNumber>;
totalSupply(): Promise<BigNumber>;
saleActive(): Promise<boolean>;
presaleActive(): Promise<boolean>;
generateProof(address: string): Promise<ProofApiResponse & ErrorApiResponse>;
mint(quantity: number): Promise<ContractReceipt | null>;
}