• Hooks
  • useAllowList

useAllowList

Hook to provide allow list for wallet.

import { useAllowList } from "@mintdrop/sdk"

Usage

import Day from "dayjs"
import { useAllowList } from "@mintdrop/sdk"
 
const Example = () => {
  const group = useAllowList()
 
  const time = group?.startTime
    ? Day.unix(group.startTime).format("LLLL")
    : "NOW"
  const price = group?.mintPrice && weiToEth(group.mintPrice)
 
  return (
    <div>
      <p>
        Group starts minting at {time} for {price}&Xi;
      </p>
      <p>Current Group mint count = {group?.mintCount}</p>
    </div>
  )
}

Returns

{
  exists: boolean,
  mintCount: number,
  mintPrice: number,    // in wei
  startTime: number,    // ETH seconds, 0 = anytime
  maxPerWallet: number  // 0 = infinite
}