Type Alias NostrConnectConnectionMethods
NostrConnectConnectionMethods: {
onAuth?: ((url: string) => Promise<void>);
onPublishEvent: ((event: NostrEvent, relays: string[]) => Promise<void>);
onSubClose: (() => Promise<void>);
onSubOpen: ((filters: Filter[], relays: string[], onEvent: ((event: NostrEvent) => void)) => Promise<void>);
}
Type declaration
Optional
onAuth?: ((url: string) => Promise<void>)
- (url): Promise<void>
Returns Promise<void>
onPublishEvent: ((event: NostrEvent, relays: string[]) => Promise<void>)
- (event, relays): Promise<void>
Parameters
- event: NostrEvent
- relays: string[]
Returns Promise<void>
onSubClose: (() => Promise<void>)
- (): Promise<void>
Returns Promise<void>
onSubOpen: ((filters: Filter[], relays: string[], onEvent: ((event: NostrEvent) => void)) => Promise<void>)
- (filters, relays, onEvent): Promise<void>
Parameters
- filters: Filter[]
- relays: string[]
- onEvent: ((event: NostrEvent) => void)
- (event): void
Returns void
Returns Promise<void>
A method for handling "auth" requests