Files
bambu-nfc/docs/superpowers/plans/2026-08-23-bambu-nfc-library.md
T
s1d3sw1ped b38f7f643b Add bambu-nfc dump parse, Key-A HKDF, and spool merge.
Parse filanfc-dump/v1 zip/JSON, Bambu 1K images, and merge stickers by tray UID. dump and mifare packages stay importable for a later common library.
2026-08-23 15:23:11 -05:00

24 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# bambu-nfc Library Implementation Plan
> **For agentic workers:** Use TDD. Spec: `docs/superpowers/specs/2026-08-23-bambu-nfc-library-design.md`
**Goal:** Go module that parses filanfc-dump/v1 zips into Bambu tags/spools and derives MIFARE Key-A from a chip UID.
**Architecture:** Public packages `dump` (JSON/zip), `mifare` (1K layout), root `bambunfc` (HKDF, block parse, Merge).
**Tech Stack:** Go 1.25, stdlib `crypto/hkdf`, `encoding/json`, `archive/zip`.
## Global Constraints
- Module `git.s1d3sw1ped.com/s1d3sw1ped/bambu-nfc`
- Brand on success: `"Bambu Lab"`
- HKDF: IKM=UID, salt=`9a759cf2c4f7caff222cb9769b41bc96`, info=`RFID-A\0`, 16×6 Key-A
- Diameter float32 at block 5 offset 8; tray UID 16 raw bytes hex
- Required dump sectors for a Bambu parse: 0, 1, 2 (`sectors_fail` is sector indexes)
- `go test -race ./...`
- Fixtures from dump-app `docs/dumps/``testdata/`
Tasks: (1) module + mifare (2) dump JSON/zip (3) KeysA (4) ParseImage/ParseDump/ParseZip (5) Merge (6) testdata + README.
Executing in this session per user "do it".