@raidguild/use-chiev
Version:
use chiev nft info
52 lines (38 loc) • 1.24 kB
Markdown
//img.shields.io/npm/v/use-chiev.svg)](https://www.npmjs.com/package/@raidguild/use-chiev) [](https://standardjs.com)
```bash
yarn add @raidguild/use-chiev
```
```jsx
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>
)
}
```
MIT © [dekanbro](https://github.com/dekanbro)
---
This hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).
> use chiev nft info
[![NPM](https: