# MOON-MINT-v1

Sister scheme to MARS-MINT-v1 and MERCURY-MINT-v1. The $MOON mint keypair is seeded from **LROC NAC frame M175124932R, the Lunar Reconnaissance Orbiter image LROC lists for the Apollo 11 landing site**, plus 32 bytes of private entropy, committed before launch and revealed after.

## Source product (LROC PDS archive)
| | |
|---|---|
| Product | `M175124932RE` (LROC NAC right-camera EDR, raw 8-bit, PRODUCT_VERSION_ID v1.8) |
| Data set | `LRO-L-LROC-2-EDR-V1.0`, volume `LROLRC_0009`, orbit 10942, original product `nacr0007c3c2` |
| URL | https://pds.lroc.im-ldi.com/data/LRO-L-LROC-2-EDR-V1.0/LROLRC_0009/DATA/SCI/2011309/NAC/M175124932RE.IMG (302 → pds.mcp.nasa.gov/data/store/img/lunar_reconnaissance_orbiter/pds4/lroc/lro-l-lroc-2-edr/LROLRC_0009/DATA/SCI/2011309/NAC/M175124932RE.IMG) |
| START_TIME | `2011-11-05T09:34:24.703` (UTC, from the attached PDS3 label; STOP_TIME 09:34:42.413) |
| Size | 264,467,400 bytes (PDS3 attached label, 1 record of 5064 B + 52,224 lines × 5,064 samples, 8-bit) |
| SHA-256 | `e8bfd20afe385af1f600c1fb3fb4bc7ef842aab26f4d9d46bc2520f0b5885a15` |
| MD5 (whole file) | `b5d1dc3bad3b2fdc70787a83236335df` |
| MD5 (label MD5_CHECKSUM, image object) | `d631e35245d9472d4c3ecc1f6d18dac0` (verified: matches the image bytes) |
| Label extras | TARGET_NAME MOON, RATIONALE_DESC "TARGET OF OPPORTUNITY", FRAME_ID RIGHT, 600 nm centre / 300 nm bandwidth, LINE_EXPOSURE_DURATION 0.3376 ms |
| Site context (LROC featured site, not the label) | Apollo 11, lat 0.6742°, lon 23.4731°; 0.399 m/px, altitude 24.034 km, incidence 40.98° |

Credit: NASA/GSFC/Arizona State University. Public domain (NASA data).
Caveat: the PDS store copy's HTTP Last-Modified is 2026-09-01 (re-hosting), but PRODUCT_CREATION_TIME in the label is 2013-11-03 and the label image MD5 matches. If the archive ever re-issues this product, the bytes change. Mirror the file (IPFS/Arweave/site) when publishing.

## Derivation
1. `moon_hash = SHA-256(IMG bytes)`
2. `entropy = 32 random bytes` (made on the minting machine only), `commitment = SHA-256(entropy)`, published before launch
3. `seed = HKDF-SHA256(ikm = entropy || moon_hash, salt = "MOON-MINT-v1", info = utf8("M175124932RE" || "2011-11-05T09:34:24.703"), L = 32)`
4. `keypair = Ed25519 from 32-byte seed` (Solana `Keypair.fromSeed` / solana-keygen); `pubkey` (base58) = contract address
5. Reveal the entropy only after the mint exists and its mint/freeze authorities are revoked.

## Scripts (zero npm deps for derive.js)
```
curl -LO https://pds.lroc.im-ldi.com/data/LRO-L-LROC-2-EDR-V1.0/LROLRC_0009/DATA/SCI/2011309/NAC/M175124932RE.IMG
node derive.js --test                   # throwaway vector, see test-vector.json
node derive.js make-commit              # REAL, run on the Mac only. Writes ~/.moon-mint/{moon-secret.json, moon-mint-keypair.json, public-commitment.json} chmod 600, refuses to overwrite
node derive.js verify --entropy <hex>   # anyone, after the reveal
python3 derive.py --test                # independent cross-check (PyNaCl + hand-rolled HKDF)
```

Test vector (entropy = 00 01 … 1f, **never mint with this**): commitment `630dcd29…10dd`, seed `3920d6fe…eead`, pubkey `9HRcaR91mxsr4EbQ6q5iYYxf1U6wmniwBjKAEoEAM3r`. Node and Python implementations agree.

## Why it can't be gamed
The image is fixed and public years before launch, so nobody can grind it. The entropy is locked by its commitment before launch, so it can't be swapped. Recovering the seed before the reveal needs a 2^256 search or a break of HMAC-SHA-256.
Tradeoff: nobody can verify the derivation until the reveal, and after the reveal anyone can rebuild the private key, so it must control nothing by then.

## Hero imagery (site only, not part of the derivation)
NASA Scientific Visualization Studio, CGI Moon Kit (svs.gsfc.nasa.gov/4720): `lroc_color_poles_4k.tif` (LROC WAC colour mosaic) + `ldem_16.tif` (LOLA). Rendered by `src/mkhero.py`.
