nip46: remove NostrConnectAdmin wrong kind.
This commit is contained in:
parent
058d0276e2
commit
5626d3048b
1
kinds.ts
1
kinds.ts
|
@ -78,7 +78,6 @@ export const ClientAuth = 22242
|
|||
export const NWCWalletRequest = 23194
|
||||
export const NWCWalletResponse = 23195
|
||||
export const NostrConnect = 24133
|
||||
export const NostrConnectAdmin = 24134
|
||||
export const HTTPAuth = 27235
|
||||
export const Followsets = 30000
|
||||
export const Genericlists = 30001
|
||||
|
|
6
nip46.ts
6
nip46.ts
|
@ -4,7 +4,7 @@ import { AbstractSimplePool, SubCloser } from './abstract-pool.ts'
|
|||
import { decrypt, encrypt } from './nip04.ts'
|
||||
import { NIP05_REGEX } from './nip05.ts'
|
||||
import { SimplePool } from './pool.ts'
|
||||
import { Handlerinformation, NostrConnect, NostrConnectAdmin } from './kinds.ts'
|
||||
import { Handlerinformation, NostrConnect } from './kinds.ts'
|
||||
import { hexToBytes } from '@noble/hashes/utils'
|
||||
|
||||
var _fetch: any
|
||||
|
@ -109,7 +109,7 @@ export class BunkerSigner {
|
|||
|
||||
this.subCloser = this.pool.subscribeMany(
|
||||
this.bp.relays,
|
||||
[{ kinds: [NostrConnect, NostrConnectAdmin], '#p': [getPublicKey(this.secretKey)] }],
|
||||
[{ kinds: [NostrConnect], '#p': [getPublicKey(this.secretKey)] }],
|
||||
{
|
||||
async onevent(event: NostrEvent) {
|
||||
const { id, result, error } = JSON.parse(await decrypt(clientSecretKey, event.pubkey, event.content))
|
||||
|
@ -155,7 +155,7 @@ export class BunkerSigner {
|
|||
// the request event
|
||||
const verifiedEvent: VerifiedEvent = finalizeEvent(
|
||||
{
|
||||
kind: method === 'create_account' ? NostrConnectAdmin : NostrConnect,
|
||||
kind: NostrConnect,
|
||||
tags: [['p', this.bp.pubkey]],
|
||||
content: encryptedContent,
|
||||
created_at: Math.floor(Date.now() / 1000),
|
||||
|
|
Loading…
Reference in New Issue