diff --git a/nip46/nip46.go b/nip46/nip46.go index fd6f69e..766186f 100644 --- a/nip46/nip46.go +++ b/nip46/nip46.go @@ -19,12 +19,22 @@ type Request struct { Params []string `json:"params"` } +func (r Request) String() string { + j, _ := json.Marshal(r) + return string(j) +} + type Response struct { ID string `json:"id"` Error string `json:"error,omitempty"` Result string `json:"result,omitempty"` } +func (r Response) String() string { + j, _ := json.Marshal(r) + return string(j) +} + type Signer interface { GetSession(clientPubkey string) (Session, bool) HandleRequest(context.Context, *nostr.Event) (req Request, resp Response, eventResponse nostr.Event, err error)