damus-io / damus

iOS nostr client
GNU General Public License v3.0
1.99k stars 288 forks source link

NIP-26 Import Delegation Token [Feature Request][Enhancement] #451

Open alltheseas opened 1 year ago

alltheseas commented 1 year ago

User Story

As a pleb nostr user who wishes to use Damus to sign events on behalf of a npub stored on a hardware signing device (or other client), I want the capability to sign on behalf of a delegator, so I am not required to copypaste the delegator npub's private key to Damus from the HSD (or other client).

Acceptance Criteria

  1. Damus user can import delegate token generated from HSD (or other client)
  2. Damus user can sign of behalf of delegator
  3. Damus user can toggle between multiple accounts [blocked by multiple accounts https://github.com/damus-io/damus/issues/403]

Damus + HSD Flow:

  1. User generates / loads key on hardware signing device [HSD]
  2. Creates npub delegation token (can authorize other npub on behalf of token on HSD) [HSD]
  3. User loads profile / QR npub of Damus [Damus]
  4. Scan QR code of Damus [HSD]
  5. Review authorization delegation details [HSD]
  6. User authorizes Damus npub to sign on behalf of HSD npub [HSD]
  7. Export delegation token (QR) [HSD] (nostr:delegation example image
  8. Scan QR / import delegation token [Damus]

NIP-26 https://github.com/nostr-protocol/nips/blob/master/26.md

Keith Mukai implementation h/t https://github.com/kdmukai

https://youtu.be/-2k6nsMZHJw https://youtu.be/_8qLi2QM3EE

https://damus.io/note1nqa2wh94hq68fqvtq6p3rfrpgjqe27c2zj9yjvxuujf98mswnzxq0dyuaf

alltheseas commented 1 year ago

The fiatjaf and Pablo7000 do not like this NIP

https://fiatjaf.com/4c79fd7b.html

https://damus.io/note1pcs2fwrsgk2ar4j6vz9fmram0dxvr2pzla3v4rc7q9tdgcvxcn6sp7p026

alltheseas commented 4 months ago

@dtonon advised NIP-26 delegation is dead

jb55 commented 4 months ago

that's just like their opinion man

alltheseas commented 4 months ago

😁

alltheseas commented 4 months ago

@jb55 you think this can be used for damus as signature app?