An open API service indexing awesome lists of open source software.

https://github.com/00impera/lock-unlock-nft-

LOCK UNLOCK NFT
https://github.com/00impera/lock-unlock-nft-

application fotos github json nft nft-gallery nft-generator nftcollection open-source openstack package react readme

Last synced: about 1 month ago
JSON representation

LOCK UNLOCK NFT

Awesome Lists containing this project

README

          

# ๐Ÿ”’ NFT LOCKED IMAGE GENERATOR

> Generate blurred "locked" preview images for your NFTs in seconds. Upload your artwork, customize the lock overlay, mint on Monad Mainnet for 100 MON, and download the locked.png ready for IPFS + OpenSea metadata.

[![Monad](https://img.shields.io/badge/Network-Monad%20Mainnet-00ff44?style=flat-square&labelColor=020a02)](https://monad.xyz)
[![HTML](https://img.shields.io/badge/Stack-Pure%20HTML%2FJS-00cc33?style=flat-square&labelColor=020a02)](#)
[![License](https://img.shields.io/badge/License-MIT-008822?style=flat-square&labelColor=020a02)](LICENSE)

---

## ๐ŸŒ Live Demo

**[โ†’ Open NFT Locked Image Generator](https://nft-rarity.imperamonad.xyz)**

---

## ๐Ÿ“ธ Preview

locked

download

---

## โœจ Features

- ๐Ÿ“ค **Drag & drop** or click to upload your NFT image
- ๐ŸŽจ **Auto-preview** โ€” original vs locked side-by-side in real-time
- โš™๏ธ **Customize** โ€” blur, darkness, main text, sub text
- ๐Ÿ’พ **Download** โ€” one click to get your `locked.png`
- ๐ŸŒฟ **Mint on Monad** โ€” send 100 MON to register ownership
- ๐Ÿ”ฅ Flame green/black interface with rising ember particles
- โšก Every button vibrates on click
- ๐Ÿ“ฑ Fully responsive โ€” works on mobile

---

## ๐Ÿš€ HOW TO USE โ€” SUPER SIMPLE

### STEP 1 โ€” Upload Your NFT Image
- Click the upload box **OR** drag your image directly onto it
- Accepts: **JPG ยท PNG ยท GIF ยท WEBP**
- Max size: 10MB

### STEP 2 โ€” Adjust Settings

| Setting | What it does | Default |
|---|---|---|
| **Blur Amount** | Slide to blur more / less | 50px |
| **Darkness** | Make the overlay darker / lighter | 50% |
| **Main Text** | Change the big lock text | `๐Ÿ”’ LOCKED` |
| **Sub Text** | Change the small description | `PURCHASE TO UNLOCK` |

### STEP 3 โ€” See Live Preview
- **Left side** = Your original image
- **Right side** = Locked version โ€” updates automatically as you change settings

### STEP 4 โ€” Download or Mint

| Action | Description |
|---|---|
| ๐Ÿ’พ **DOWNLOAD LOCKED.PNG** | Saves `locked-nft.png` to your computer |
| ๐ŸŒฟ **MINT โ€” 100 MON** | Sends 100 MON on Monad Mainnet โ†’ auto-downloads after confirmation |

---

## ๐Ÿ“‹ NEXT STEPS AFTER DOWNLOAD

```
โœ… You now have locked.png
๐Ÿ“ค Upload to IPFS โ†’ Pinata.cloud or NFT.Storage
๐Ÿ“ Copy the IPFS hash (ipfs://Qm...)
๐Ÿ”„ Update your NFT JSON metadata:
"image": "ipfs://YOUR_LOCKED_HASH"
๐Ÿš€ Mint on OpenSea with locked preview!
```

**Example metadata JSON:**
```json
{
"name": "My NFT #001",
"description": "Purchase to unlock the full artwork.",
"image": "ipfs://QmYOUR_LOCKED_IMAGE_HASH",
"animation_url": "ipfs://QmYOUR_FULL_IMAGE_HASH"
}
```

---

## โš™๏ธ All Functions

| Function | Description |
|---|---|
| `loadImage(file)` | Reads file via FileReader, sets canvas size, draws original + locked |
| `setupCanvases()` | Sets both canvases to `min(width, height, 800)` square |
| `drawOriginal()` | Draws the source image centered and scaled on the left canvas |
| `drawLocked()` | Draws blurred image + darkness + green tint + scanlines + lock icon + text + border glow |
| `downloadLocked()` | `canvas.toBlob()` โ†’ creates download link โ†’ triggers save as `locked-nft.png` |
| `mintOnChain()` | Connects MetaMask โ†’ switches to Monad โ†’ sends 100 MON โ†’ polls receipt โ†’ auto-downloads on success |
| `resetAll()` | Clears canvases, resets all inputs to defaults |

---

## ๐ŸŒฟ Mint Configuration

```javascript
const OWNER = '0x592B35c8917eD36c39Ef73D0F5e92B0173560b2e'; // receives MON
const CHAIN_HEX = '0x8F'; // Monad chain ID 143
const PRICE_WEI = '0x' + BigInt('100000000000000000000').toString(16); // 100 MON
```

**Mint flow:**
1. `eth_requestAccounts` โ€” connect wallet
2. `wallet_switchEthereumChain` โ€” switch to Monad (adds it automatically if missing)
3. `eth_sendTransaction` โ€” sends 100 MON to owner (gas: 21000)
4. Polls `eth_getTransactionReceipt` every 2s (max 3 minutes)
5. On success โ†’ shows clickable TX link to Monad explorer โ†’ auto-downloads PNG

---

## ๐Ÿ—‚ File Structure

```
NFT-CARD-GENERATOR-RARITY/
โ”œโ”€โ”€ index.html # Complete app โ€” single file, zero dependencies
โ””โ”€โ”€ README.md
```

---

## ๐Ÿ“ฑ Browser Support

| Browser | Upload | Preview | Download | Mint |
|---|---|---|---|---|
| Chrome | โœ… | โœ… | โœ… | โœ… |
| Firefox | โœ… | โœ… | โœ… | โœ… |
| Safari | โœ… | โœ… | โœ… | โœ… |
| Mobile Chrome | โœ… | โœ… | โœ… | โœ… |
| Mobile Safari | โœ… | โœ… | โœ… | โœ… |

---

## ๐Ÿ”— Related Projects

| Project | URL |
|---|---|
| NFT Card Generator | [nft-rarity.imperamonad.xyz](https://nft-rarity.imperamonad.xyz) |
| PYRATHOS Mining | [pyrathos.imperamonad.xyz](https://pyrathos.imperamonad.xyz) |
| Quantum Engine NFT | [quantum-engine.imperamonad.xyz](https://quantum-engine.imperamonad.xyz) |
| IceBox Mint | [icebox.imperamonad.xyz](https://icebox.imperamonad.xyz) |
| Portfolio | [imperamonad.xyz](https://imperamonad.xyz) |

---

## ๐Ÿ“„ License

MIT โ€” see [LICENSE](LICENSE)

---

*Built on [Monad Mainnet](https://monad.xyz) ยท Pure HTML/Canvas/JS ยท No dependencies*