remove the kind type parameter from events and filters.

This commit is contained in:
fiatjaf
2023-12-16 10:10:37 -03:00
parent 1939c46eaa
commit 6a07e7c1cc
21 changed files with 157 additions and 211 deletions

View File

@@ -1,6 +1,6 @@
import { finishEvent } from './event.ts'
import { NWCWalletRequest } from './kinds.ts'
import { encrypt } from './nip04.ts'
import { Kind } from './event'
export function parseConnectionString(connectionString: string) {
const { pathname, searchParams } = new URL(connectionString)
@@ -32,7 +32,7 @@ export async function makeNwcRequestEvent({
}
const encryptedContent = await encrypt(secret, pubkey, JSON.stringify(content))
const eventTemplate = {
kind: Kind.NwcRequest,
kind: NWCWalletRequest,
created_at: Math.round(Date.now() / 1000),
content: encryptedContent,
tags: [['p', pubkey]],