nip59

package
v0.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GiftUnwrap

func GiftUnwrap(
	gw nostr.Event,
	decrypt func(otherpubkey, ciphertext string) (string, error),
) (rumor nostr.Event, err error)

func GiftWrap

func GiftWrap(
	rumor nostr.Event,
	recipient string,
	encrypt func(plaintext string) (string, error),
	sign func(*nostr.Event) error,
	modify func(*nostr.Event),
) (nostr.Event, error)

GiftWrap takes a 'rumor', encrypts it with our own key, making a 'seal', then encrypts that with a nonce key and signs that (after potentially applying a modify function, which can be nil otherwise), yielding a 'gift-wrap'.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL