mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-12 18:08:52 +00:00
move Nip05 type to nip05.ts
This commit is contained in:
2
core.ts
2
core.ts
@@ -23,8 +23,6 @@ export type NostrEvent = Event
|
|||||||
export type EventTemplate = Pick<Event, 'kind' | 'tags' | 'content' | 'created_at'>
|
export type EventTemplate = Pick<Event, 'kind' | 'tags' | 'content' | 'created_at'>
|
||||||
export type UnsignedEvent = Pick<Event, 'kind' | 'tags' | 'content' | 'created_at' | 'pubkey'>
|
export type UnsignedEvent = Pick<Event, 'kind' | 'tags' | 'content' | 'created_at' | 'pubkey'>
|
||||||
|
|
||||||
export type Nip05 = `${string}@${string}`
|
|
||||||
|
|
||||||
/** An event whose signature has been verified. */
|
/** An event whose signature has been verified. */
|
||||||
export interface VerifiedEvent extends Event {
|
export interface VerifiedEvent extends Event {
|
||||||
[verifiedSymbol]: true
|
[verifiedSymbol]: true
|
||||||
|
|||||||
3
nip05.ts
3
nip05.ts
@@ -1,6 +1,7 @@
|
|||||||
import { Nip05 } from './core.ts'
|
|
||||||
import { ProfilePointer } from './nip19.ts'
|
import { ProfilePointer } from './nip19.ts'
|
||||||
|
|
||||||
|
export type Nip05 = `${string}@${string}`
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NIP-05 regex. The localpart is optional, and should be assumed to be `_` otherwise.
|
* NIP-05 regex. The localpart is optional, and should be assumed to be `_` otherwise.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user