From 83a51a8514ae66c7e3952532320796d821c08aa2 Mon Sep 17 00:00:00 2001 From: CodyTseng <64680921+CodyTseng@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:40:46 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20CodyTsen?= =?UTF-8?q?g/nostr-relay@d818d4cf57c81bbf523cd6c2e4e58fb4fba3d620=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/_nostr_relay_common.BaseError.html | 2 +- .../_nostr_relay_common.ClientContext.html | 14 ++++++------ ...str_relay_common.ConsoleLoggerService.html | 4 ++-- .../_nostr_relay_common.EventRepository.html | 10 ++++----- classes/_nostr_relay_common.EventUtils.html | 4 ++-- classes/_nostr_relay_common.FilterUtils.html | 4 ++-- .../_nostr_relay_common.InternalError.html | 2 +- classes/_nostr_relay_core.NostrRelay.html | 22 +++++++++---------- ...pository_sqlite.EventRepositorySqlite.html | 12 +++++----- classes/_nostr_relay_validator.Validator.html | 10 ++++----- ...nostr_relay_common.countPowDifficulty.html | 2 +- ...tr_relay_common.getTimestampInSeconds.html | 2 +- functions/_nostr_relay_common.isNil.html | 2 +- .../_nostr_relay_common.isUndefined.html | 2 +- .../_nostr_relay_common.schnorrSign.html | 2 +- .../_nostr_relay_common.schnorrVerify.html | 2 +- functions/_nostr_relay_common.sha256.html | 2 +- ..._relay_core.createOutgoingAuthMessage.html | 2 +- ...elay_core.createOutgoingClosedMessage.html | 2 +- ..._relay_core.createOutgoingEoseMessage.html | 2 +- ...relay_core.createOutgoingEventMessage.html | 2 +- ...elay_core.createOutgoingNoticeMessage.html | 2 +- ...tr_relay_core.createOutgoingOkMessage.html | 2 +- ...ostr_relay_common.AfterEventBroadcast.html | 4 ++-- .../_nostr_relay_common.AfterEventHandle.html | 4 ++-- ...str_relay_common.BeforeEventBroadcast.html | 4 ++-- ..._nostr_relay_common.BeforeEventHandle.html | 4 ++-- interfaces/_nostr_relay_common.Client.html | 4 ++-- interfaces/_nostr_relay_common.Event.html | 4 ++-- ...ay_common.EventRepositoryUpsertResult.html | 4 ++-- interfaces/_nostr_relay_common.Filter.html | 4 ++-- interfaces/_nostr_relay_common.Logger.html | 4 ++-- modules/_nostr_relay_common.html | 2 +- modules/_nostr_relay_core.html | 2 +- .../_nostr_relay_event_repository_sqlite.html | 2 +- modules/_nostr_relay_validator.html | 2 +- ..._relay_common.BeforeEventHandleResult.html | 2 +- .../_nostr_relay_common.BeforeHookResult.html | 2 +- ...str_relay_common.ClientContextOptions.html | 2 +- .../_nostr_relay_common.ClientReadyState.html | 2 +- ..._nostr_relay_common.EventHandleResult.html | 2 +- types/_nostr_relay_common.EventId.html | 2 +- types/_nostr_relay_common.EventKind.html | 2 +- types/_nostr_relay_common.EventType.html | 2 +- ...ostr_relay_common.IncomingAuthMessage.html | 2 +- ...str_relay_common.IncomingCloseMessage.html | 2 +- ...str_relay_common.IncomingEventMessage.html | 2 +- .../_nostr_relay_common.IncomingMessage.html | 2 +- ...nostr_relay_common.IncomingReqMessage.html | 2 +- types/_nostr_relay_common.LogLevel.html | 2 +- types/_nostr_relay_common.MessageType.html | 2 +- .../_nostr_relay_common.NostrRelayPlugin.html | 2 +- ...ostr_relay_common.OutgoingAuthMessage.html | 2 +- ...tr_relay_common.OutgoingClosedMessage.html | 2 +- ...ostr_relay_common.OutgoingEoseMessage.html | 2 +- ...str_relay_common.OutgoingEventMessage.html | 2 +- .../_nostr_relay_common.OutgoingMessage.html | 2 +- ...tr_relay_common.OutgoingNoticeMessage.html | 2 +- ..._nostr_relay_common.OutgoingOkMessage.html | 2 +- types/_nostr_relay_common.Pubkey.html | 2 +- types/_nostr_relay_common.Signature.html | 2 +- types/_nostr_relay_common.SubscriptionId.html | 2 +- types/_nostr_relay_common.Tag.html | 2 +- types/_nostr_relay_common.TagName.html | 2 +- ...tr_relay_core.HandleAuthMessageResult.html | 2 +- ...r_relay_core.HandleCloseMessageResult.html | 2 +- ...r_relay_core.HandleEventMessageResult.html | 2 +- ..._nostr_relay_core.HandleMessageResult.html | 2 +- ...str_relay_core.HandleReqMessageResult.html | 2 +- .../_nostr_relay_core.NostrRelayOptions.html | 2 +- types/_nostr_relay_validator.RawData.html | 2 +- ...ay_validator.RequiredValidatorOptions.html | 2 +- ...ostr_relay_validator.ValidatorOptions.html | 2 +- ...nostr_relay_common.ClientReadyState-1.html | 2 +- .../_nostr_relay_common.EventKind-1.html | 2 +- .../_nostr_relay_common.EventType-1.html | 2 +- variables/_nostr_relay_common.LogLevel-1.html | 2 +- .../_nostr_relay_common.MessageType-1.html | 2 +- variables/_nostr_relay_common.TagName-1.html | 2 +- 79 files changed, 120 insertions(+), 120 deletions(-) diff --git a/classes/_nostr_relay_common.BaseError.html b/classes/_nostr_relay_common.BaseError.html index 7b4b8637..2bc5580a 100644 --- a/classes/_nostr_relay_common.BaseError.html +++ b/classes/_nostr_relay_common.BaseError.html @@ -1,4 +1,4 @@ -
Create a new ClientContext instance. Usually you don't need to create this.
Client instance, usually a WebSocket
Client context options
-Readonly
idClient ID, a random UUID. Also used as the AUTH challenge.
-Public key of the client. Will be set after the client sends an AUTH message.
-Readonly
subscriptionsSubscriptions of the client. The key is the subscription ID. The value is the filters.
-Whether the client is open. Only can send messages when the client is open.
-Readonly
idClient ID, a random UUID. Also used as the AUTH challenge.
+Public key of the client. Will be set after the client sends an AUTH message.
+Readonly
subscriptionsSubscriptions of the client. The key is the subscription ID. The value is the filters.
+Whether the client is open. Only can send messages when the client is open.
+Send a message to the client. It will be ignored if the client is not open.
Outgoing message
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Abstract
EventRepository is an interface for storing and retrieving events. You can implement this interface to create your own event repository based on your favorite database.
-Readonly
isThis property indicates whether the search feature is supported.
-Abstract
findAbstract
findThis method doesn't need to be implemented. It's just a helper method for +
Abstract
upsertThis method is called when a new event should be stored. You should handle +
Abstract
upsertThis method is called when a new event should be stored. You should handle the REGULAR, REPLACEABLE and PARAMETERIZED REPLACEABLE events correctly.
More info: https://github.com/nostr-protocol/nips/blob/master/01.md
Event to store
-Generated using TypeDoc
Generated using TypeDoc
Static
checkOptional
pubkey: stringStatic
extractDTagStatic
extractStatic
extractStatic
getStatic
getStatic
isStatic
isStatic
isStatic
isStatic
isStatic
validateOptional
createdOptional
createdOptional
minGenerated using TypeDoc
Static
checkOptional
pubkey: stringStatic
extractDTagStatic
extractStatic
extractStatic
getStatic
getStatic
isStatic
isStatic
isStatic
isStatic
isStatic
validateOptional
createdOptional
createdOptional
minGenerated using TypeDoc
Static
hasGenerated using TypeDoc
Static
hasGenerated using TypeDoc
Create a new NostrRelay instance.
EventRepository to use
Options for NostrRelay
-Handle an AUTH message from a client.
+Handle an AUTH message from a client.
Handle a CLOSE message from a client.
+Handle a CLOSE message from a client.
Client instance, usually a WebSocket
Subscription ID
-Handle a new client connection. This method should be called when a new client connects to the Nostr Relay server.
Client instance, usually a WebSocket
-Handle a client disconnection. This method should be called when a client disconnects from the Nostr Relay server.
Client instance, usually a WebSocket
-Handle an EVENT message from a client.
+Handle an EVENT message from a client.
Handle an incoming message from a client. It can be an EVENT, REQ, CLOSE, +
Handle an incoming message from a client. It can be an EVENT, REQ, CLOSE,
or AUTH message. Before calling this method, you should validate the
message by @nostr-relay/validator
or other validators.
Client instance, usually a WebSocket
Incoming message from the client
-Handle a REQ message from a client.
+Handle a REQ message from a client.
Check whether a client is authorized. If NIP-42 is unable, this method always returns true.
Client instance, usually a WebSocket
-Register a plugin.
+Register a plugin.
Plugin to register
-Generated using TypeDoc
Generated using TypeDoc
EventRepository is an interface for storing and retrieving events. You can implement this interface to create your own event repository based on your favorite database.
-Readonly
isThis property indicates whether the search feature is supported.
-This method is called when a client requests events.
+Readonly
isThis property indicates whether the search feature is supported.
+This method doesn't need to be implemented. It's just a helper method for +
This method is called when a new event should be stored. You should handle +
This method is called when a new event should be stored. You should handle the REGULAR, REPLACEABLE and PARAMETERIZED REPLACEABLE events correctly.
More info: https://github.com/nostr-protocol/nips/blob/master/01.md
Event to store
-Generated using TypeDoc
Generated using TypeDoc
Zod based validator for Nostr Relay messages
-Create a new validator
Validator options
-Validate event
+Validate filter
+Validate incoming message
+Validate incoming message
data to validate
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Create an outgoing AUTH message. More info: https://github.com/nostr-protocol/nips/blob/master/42.md
challenge string
-Generated using TypeDoc
Generated using TypeDoc
Client context.
-