Add logging to nip46
This commit is contained in:
@@ -104,6 +104,8 @@ export class Nip46Broker extends Emitter {
|
|||||||
console.error(`Invalid nostr-connect response: ${json}`)
|
console.error(`Invalid nostr-connect response: ${json}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('nip46 response:', res)
|
||||||
|
|
||||||
if (res.result === "auth_url") {
|
if (res.result === "auth_url") {
|
||||||
this.emit(`auth-${res.id}`, res)
|
this.emit(`auth-${res.id}`, res)
|
||||||
} else {
|
} else {
|
||||||
@@ -157,6 +159,8 @@ export class Nip46Broker extends Emitter {
|
|||||||
const content = await this.#signer[this.#algorithm].encrypt(recipient, payload)
|
const content = await this.#signer[this.#algorithm].encrypt(recipient, payload)
|
||||||
const template = createEvent(NOSTR_CONNECT, {content, tags: [["p", recipient]]})
|
const template = createEvent(NOSTR_CONNECT, {content, tags: [["p", recipient]]})
|
||||||
|
|
||||||
|
console.log('nip46 request:', {id, method, params})
|
||||||
|
|
||||||
publish({
|
publish({
|
||||||
relays: this.#handler.relays,
|
relays: this.#handler.relays,
|
||||||
event: await this.#signer.sign(template),
|
event: await this.#signer.sign(template),
|
||||||
|
|||||||
Reference in New Issue
Block a user