Documentation ¶
Index ¶
- Constants
- func AuthenticateConnection(ws *websocket.Conn) error
- func BuildServer(store stores.Store) *fiber.App
- func CreateNIP88Event(relayPrivKey *btcec.PrivateKey, userPubKey string, store stores.Store) error
- func GetListenerChallenge(ws *websocket.Conn) (*string, error)
- func PackRelayForSig(nr *NIP11RelayInfo) []byte
- func SignRelay(relay *NIP11RelayInfo, privKey *btcec.PrivateKey) error
- func StartServer(app *fiber.App) error
- type Event
- type EventMessage
- type HornetExtension
- type ListenerData
- type Message
- type NIP11RelayInfo
- type ReqEnvelope
- type Subscription
Constants ¶
View Source
const ( AddressStatusAvailable = "available" AddressStatusAllocated = "allocated" AddressStatusUsed = "used" )
Variables ¶
This section is empty.
Functions ¶
func AuthenticateConnection ¶
func BuildServer ¶
func CreateNIP88Event ¶
func PackRelayForSig ¶
func PackRelayForSig(nr *NIP11RelayInfo) []byte
func SignRelay ¶
func SignRelay(relay *NIP11RelayInfo, privKey *btcec.PrivateKey) error
func StartServer ¶
func StartServer(app *fiber.App) error
Types ¶
type EventMessage ¶
type EventMessage struct {
Event nostr.Event // Adapted for the specific event structure you're using
}
type HornetExtension ¶
type ListenerData ¶
type ListenerData struct {
// contains filtered or unexported fields
}
type Message ¶
type Message struct { MessageType string `json:"messageType"` Event json.RawMessage `json:"event"` }
type NIP11RelayInfo ¶
type NIP11RelayInfo struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Pubkey string `json:"pubkey,omitempty"` Contact string `json:"contact,omitempty"` SupportedNIPs []int `json:"supported_nips,omitempty"` Software string `json:"software,omitempty"` Version string `json:"version,omitempty"` HornetExtension *HornetExtension `json:"hornet_extension,omitempty"` // custom extension for p2p context }
TODO: maybe we should move this into a different package since we use it in the sync package as well It certainly shouldn't be here, that's for sure
func GetRelayInfo ¶
func GetRelayInfo() NIP11RelayInfo
type ReqEnvelope ¶
type ReqEnvelope struct { SubscriptionID string nostr.Filter }
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.