@raidguild/use-chiev
v0.0.3
Published
use chiev nft info
Downloads
23
Readme
use-chiev
use chiev nft info
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.