nostr-protocol / nips

Nostr Implementation Possibilities
2.4k stars 583 forks source link

[NIP-55] - Change return field from signature to result #1533

Closed greenart7c3 closed 1 month ago

greenart7c3 commented 1 month ago

This changes the return field from signature to result Returning signature can confuse people since it only returns the signature if it's a sign_event

vitorpamplona commented 1 month ago

Ack. Let's make sure all implementers know this is changing.

greenart7c3 commented 1 month ago

@haorendashu you can change this in your signer too For now im returning both the signature and the result fields in Amber

dluvian commented 1 month ago

signature is better than result for sign_event. With result I would have guessed that I receive the whole signed event instead of just the signature.

greenart7c3 commented 1 month ago

signature is better than result for sign_event. With result I would have guessed that I receive the whole signed event instead of just the signature.

Maybe we can add a return type too, so clients can choose what to return In the web intents i already do something like this because some clients just want to send the content, tags and createdAt and the signer fill the id, pubkey and sig

haorendashu commented 1 month ago

@greenart7c3 Have you providered a implementation ? If we reach a consensus. I want to test the client first and than i change my signer.

greenart7c3 commented 1 month ago

@greenart7c3 Have you providered a implementation ? If we reach a consensus. I want to test the client first and than i change my signer.

Latest version of amethyst has this change

haorendashu commented 1 month ago

@greenart7c3 OK, I also change to return both signature and result. Maybe i will publish it at next week.