# @niftykit/diamond

> NiftyKit Diamond SDK

Latest version **0.3.1** (published 2026-02-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @niftykit/diamond
pnpm add @niftykit/diamond
yarn add @niftykit/diamond
bun add @niftykit/diamond
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2026-02-05 |
| First published | 2023-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | NiftyKit |
| Maintainers | jcurbelo, kelokchan |
| Keywords | NiftyKit, sdk, diamond, web3, ethers |

## Links

- npm: https://www.npmjs.com/package/@niftykit/diamond
- Repository: https://github.com/niftykit-inc/niftykit-sdk
- Issues: https://github.com/niftykit-inc/niftykit-sdk/issues
- npm.io page: https://npm.io/package/@niftykit/diamond

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^1.6.2
- [ethers](https://npm.io/package/ethers.md) ^5.8.0

## Recent versions

- 0.3.1 (latest) — 2026-02-05
- 0.2.15 — 2024-01-31
- 0.2.9 — 2023-11-27
- 0.2.8 — 2023-11-03
- 0.2.3 — 2023-09-29
- 0.2.2 — 2023-09-29
- 0.2.1 — 2023-05-03
- 0.2.0 — 2023-05-03

## README

# Diamond SDK

NiftyKit Diamond SDK Library.

## Installation

Install via npm or yarn

```bash
# with npm
npm install @niftykit/diamond

# with yarn
yarn add @niftykit/diamond
```

Or use it via CDN

```html
<script async src='https://unpkg.com/@niftykit/diamond/dist/umd/index.js'></script>
```

## How to use

### Drop Collection

```typescript
// using ethers.js
import { ethers } from 'ethers';
import Diamond from '@niftykit/diamond';

const provider = new ethers.providers.Web3Provider(window.ethereum, 'any');
await provider.send('eth_requestAccounts', []);
const signer = provider.getSigner();

const diamond = await Diamond.create(signer, 'YOUR-SDK-KEY');

// minter
const recipient = await signer.getAddress();

// get current price
const price = await diamond.apps.drop.price();

// mint 1 NFT
const tx = await state.diamond.apps.drop.mintTo(recipient, 1, {
  value: price,
});

await tx.wait();

```

### Edition Collection

```typescript
// using ethers.js
import { ethers } from 'ethers';
import Diamond from '@niftykit/diamond';

const provider = new ethers.providers.Web3Provider(window.ethereum, 'any');
await provider.send('eth_requestAccounts', []);
const signer = provider.getSigner();

const diamond = await Diamond.create(signer, 'YOUR-SDK-KEY');

// edition id
const editionId = 0; // change this to your edition id

// get edition price
const price = await diamond.apps.edition.getEditionPrice(editionId);

// minter
const recipient = await signer.getAddress();

// check presale (if any)
const verify = await state.diamond.verifyForEdition(
  recipient,
  editionId
);

// mint 1 NFT
const tx = await diamond.apps.edition.mintEdition(
  recipient,
  editionId,
  1,
  verify?.proof ?? [],
  {
    value: price,
  }
);

await tx.wait();

```

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