mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-12 10:08:49 +00:00
Improve event types
This commit is contained in:
2
nip26.ts
2
nip26.ts
@@ -48,7 +48,7 @@ export function createDelegation(
|
||||
}
|
||||
}
|
||||
|
||||
export function getDelegator(event: Event): string | null {
|
||||
export function getDelegator(event: Event<number>): string | null {
|
||||
// find delegation tag
|
||||
let tag = event.tags.find(tag => tag[0] === 'delegation' && tag.length >= 4)
|
||||
if (!tag) return null
|
||||
|
||||
Reference in New Issue
Block a user