@raidguild/use-chiev

use chiev nft info

Usage no npm install needed!

<script type="module">
  import raidguildUseChiev from 'https://cdn.skypack.dev/@raidguild/use-chiev';
</script>

README

use-chiev

use chiev nft info

NPM JavaScript Style Guide

Install

yarn add @raidguild/use-chiev

Usage

import React, { Component } from 'react'
import { useChievHook } from '@raidguild/use-chiev';

const Example = () => {
  const { clones, getURI, numTokenOfGen0 } = useChievHook();
  useEffect(() => {
    const getOnChainData = async () => {
      const count = await numTokenOfGen0(
        "<eth address>",
        1
      );
      const uri = await getURI(1);

    };
    getOnChainData();
    // eslint-disable-next-line
  }, []);

  return (
      <div>
      <h1>Chiev Token Hook</h1>
      <p>clones.usersTokens has a lits of NFT owners and the tokens they own</p>
      <p>getURI will return the meta data uri from any token id</p>
      <p>numTokenOfGen0 will return the count of clones for a user for a gen0</p>
      </div>
  )
}

License

MIT © dekanbro


This hook is created using create-react-hook.