# use-candymachine

> `useCandymachine` is a [React Hook](https://reactjs.org/docs/hooks-intro.html) that provides a simple interface to interact with a [Candy Machine](https://docs.metaplex.com/programs/candy-machine/). It accepts a Candymachine ID (address) and a [Connection

Latest version **0.2.1** (published 2022-10-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install use-candymachine
pnpm add use-candymachine
yarn add use-candymachine
bun add use-candymachine
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2022-10-04 |
| First published | 2022-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 312.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | AnishDe12020 |
| Maintainers | anishde12020 |
| Keywords | solana, nft, metaplex, candymachine, minting nfts, solana nfts, metaplex nfts, metaplex react hook |

## Links

- npm: https://www.npmjs.com/package/use-candymachine
- Repository: https://github.com/AnishDe12020/use-candymachine
- Issues: https://github.com/AnishDe12020/use-candymachin/issues
- npm.io page: https://npm.io/package/use-candymachine

## Dependencies (3)

- [@changesets/cli](https://npm.io/package/@changesets/cli.md) ^2.24.4
- [@solana/web3.js](https://npm.io/package/@solana/web3.js.md) ^1.62.0
- [@metaplex-foundation/js](https://npm.io/package/@metaplex-foundation/js.md) ^0.15.0

## Recent versions

- 0.2.1 (latest) — 2022-10-04
- 0.2.0 — 2022-10-04
- 0.1.0 — 2022-09-21

## README

# Use Candymachine Hook

`useCandymachine` is a [React Hook](https://reactjs.org/docs/hooks-intro.html) that provides a simple interface to interact with a [Candy Machine](https://docs.metaplex.com/programs/candy-machine/). It accepts a Candymachine ID (address) and a [Connection Object](https://solana-labs.github.io/solana-web3.js/classes/Connection.html) and then returns multiple functions and other state variables.

# Features

- Fetching a Candymachine
- Fetching nfts that belong to a Candymachine
- Pagination when fetching nfts that belong to a Candymachine

### Will be implemented

- A `mint` function that can be directly called to mint a NFT
- Cleaner code, things are a little here and there now. Let me know (via an issue) if you have any suggestions. Maybe I am going to split the main hook into multiple ones (and then have a main one) but didn't decide upon that yet.

... more stuff (open an issue if you wanna suggest something)

## Contributing

All contributions are welcome!

To get started, fork the repository, clone it, create a new branch that describes the new feature or the bug it is fixing. Then make the required changes, commit them (we strongly recommend that you follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification and gitmojis are welcome). The next step is to create a pull request and a maintainer will review it as soon as possible.

## Contact

E-mail: [contact@anishde.dev](mailto:contact@anishde.dev)
Twitter: [@AnishDe12020](https://twitter.com/AnishDe12020)

---
_Source: https://npm.io/package/use-candymachine · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
