mirror of
https://github.com/Routstr/routstrd.git
synced 2026-10-05 20:38:22 +00:00
Register coco-cashu-plugin-npc with the in-process coco wallet so the daemon gets a persistent Lightning address (username@npubx.cash, or an npub fallback) whose paid quotes are synced into the wallet automatically via websocket, mirroring cocod's integration. - coco-client: derive the NPC Nostr signer from the wallet mnemonic (NIP-06), register NPCPlugin after initializeCoco, and expose getNpcAddress/setNpcUsername/syncNpc on the CocodClient interface. New options: enableNpc (default true) and npcBaseUrl. - cocod-client: add the same NPC methods to the legacy socket client as passthroughs to cocod's /npc/address and /npc/username routes, preserving cocod's 402 payment-required status. - http: add GET /wallet/npc/address, POST /wallet/npc/username (402 payment-required flow) and POST /wallet/npc/sync. - cli: add 'routstrd wallet npc address|username <name> [--confirm]|sync'. - tests: mock NPC plugin exercises registration, address formatting, username 402 mapping and sync through the real coco plugin host; legacy passthrough tests; migration test opts out of NPC.