mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-04-10 20:59:24 +02:00
nip46: dynamic signer sessions were missing nip44 conversation key.
This commit is contained in:
parent
ab52b3efb2
commit
d4399892ee
@ -10,6 +10,7 @@ import (
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"github.com/nbd-wtf/go-nostr/nip04"
|
||||
"github.com/nbd-wtf/go-nostr/nip44"
|
||||
)
|
||||
|
||||
var _ Signer = (*DynamicSigner)(nil)
|
||||
@ -121,6 +122,11 @@ func (p *DynamicSigner) HandleRequest(ctx context.Context, event *nostr.Event) (
|
||||
return req, resp, eventResponse, fmt.Errorf("failed to compute shared secret: %w", err)
|
||||
}
|
||||
|
||||
session.ConversationKey, err = nip44.GenerateConversationKey(event.PubKey, handlerSecret)
|
||||
if err != nil {
|
||||
return req, resp, eventResponse, fmt.Errorf("failed to compute shared secret: %w", err)
|
||||
}
|
||||
|
||||
session.PublicKey, err = userKeyer.GetPublicKey(ctx)
|
||||
if err != nil {
|
||||
return req, resp, eventResponse, fmt.Errorf("failed to get public key: %w", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user