Solana Address Book (Easy)
Build a REST API for managing Solana addresses. Detect whether each address is a wallet or a PDA, and verify ownership where applicable.
Requirements
- Persist contacts in a database or in-memory store (your choice for the bounty).
- Validate Solana address format before accepting a contact.
Contacts CRUD
POST /api/contacts — Add a contact
Body: { "name": string, "address": string }
Response 201: { "id": number, "name": string, "address": string, "type": "wallet" | "pda", "createdAt": string }
GET /api/contacts — List contacts
Query param: ?type=wallet or ?type=pda to filter by detected type.
GET /api/contacts/:id — Fetch one contact
PATCH /api/contacts/:id — Update name or address (re-validate on address change)
DELETE /api/contacts/:id — Remove a contact
Edge cases
- Reject invalid base58 / wrong length addresses with 400.
- If the same address is submitted twice, return 409 or upsert — document your choice in the README.