Documentation
¶
Overview ¶
Package realy_lol is a nostr library, relay and associated tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Description = "relay powered by the realy framework"
View Source
var URL = "https://realy.lol"
View Source
var Version string
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package apputil provides some simple filesystem functions
|
Package apputil provides some simple filesystem functions |
|
Package atomic provides simple wrappers around numerics to enforce atomic access.
|
Package atomic provides simple wrappers around numerics to enforce atomic access. |
|
internal/gen-atomicint
command
gen-atomicint generates an atomic wrapper around an integer type.
|
gen-atomicint generates an atomic wrapper around an integer type. |
|
internal/gen-atomicwrapper
command
gen-atomicwrapper generates wrapper types around other atomic types.
|
gen-atomicwrapper generates wrapper types around other atomic types. |
|
Package auth implements NIP-42 authentication.
|
Package auth implements NIP-42 authentication. |
|
Package bech32encoding implements NIP-19 entities, which are bech32 encoded data that describes nostr data types.
|
Package bech32encoding implements NIP-19 entities, which are bech32 encoded data that describes nostr data types. |
|
pointers
Package pointers is a set of basic nip-19 data types for generating bech32 encoded nostr entities.
|
Package pointers is a set of basic nip-19 data types for generating bech32 encoded nostr entities. |
|
tlv
Package tlv implements a simple Type Length Value encoder for nostr NIP-19 bech32 encoded entities.
|
Package tlv implements a simple Type Length Value encoder for nostr NIP-19 bech32 encoded entities. |
|
Package cmd contains the executable applications of the realy suite.
|
Package cmd contains the executable applications of the realy suite. |
|
lerproxy
command
Command lerproxy implements https reverse proxy with automatic LetsEncrypt usage for multiple hostnames/backends,your own SSL certificates, nostr NIP-05 DNS verification hosting and Go vanity redirects.
|
Command lerproxy implements https reverse proxy with automatic LetsEncrypt usage for multiple hostnames/backends,your own SSL certificates, nostr NIP-05 DNS verification hosting and Go vanity redirects. |
|
lerproxy/buf
Package buf implements a simple concurrent safe buffer pool for raw bytes.
|
Package buf implements a simple concurrent safe buffer pool for raw bytes. |
|
lerproxy/hsts
Package hsts implements a HTTP handler that enforces HSTS.
|
Package hsts implements a HTTP handler that enforces HSTS. |
|
lerproxy/reverse
Package reverse is a copy of httputil.NewSingleHostReverseProxy with addition of "X-Forwarded-Proto" header.
|
Package reverse is a copy of httputil.NewSingleHostReverseProxy with addition of "X-Forwarded-Proto" header. |
|
lerproxy/tcpkeepalive
Package tcpkeepalive implements a net.TCPListener with a singleton set period for a default 3 minute keep-aline.
|
Package tcpkeepalive implements a net.TCPListener with a singleton set period for a default 3 minute keep-aline. |
|
lerproxy/timeout
Package timeout provides a simple extension of a net.TCPConn with a configurable read/write deadline.
|
Package timeout provides a simple extension of a net.TCPConn with a configurable read/write deadline. |
|
lerproxy/util
Package util provides some helpers for lerproxy, a tool to convert maps of strings to slices of the same strings, and a helper to avoid putting two / in a URL.
|
Package util provides some helpers for lerproxy, a tool to convert maps of strings to slices of the same strings, and a helper to avoid putting two / in a URL. |
|
nauth
command
|
|
|
nurl
command
Package main is a simple implementation of a cURL like tool that can do simple GET/POST operations on a HTTP server that understands NIP-98 authentication, with the signing key found in an environment variable.
|
Package main is a simple implementation of a cURL like tool that can do simple GET/POST operations on a HTTP server that understands NIP-98 authentication, with the signing key found in an environment variable. |
|
realy
command
Package main is a nostr relay with a simple follow/mute list authentication scheme and the new HTTP REST based protocol.
|
Package main is a nostr relay with a simple follow/mute list authentication scheme and the new HTTP REST based protocol. |
|
realy/app
Package app implements the realy nostr relay with a simple follow/mute list authentication scheme and the new HTTP REST based protocol.
|
Package app implements the realy nostr relay with a simple follow/mute list authentication scheme and the new HTTP REST based protocol. |
|
vainstr
command
Package main is a simple nostr key miner that uses the fast bitcoin secp256k1 C library to derive npubs with specified prefix/infix/suffix strings present.
|
Package main is a simple nostr key miner that uses the fast bitcoin secp256k1 C library to derive npubs with specified prefix/infix/suffix strings present. |
|
Package codec is a set of interfaces for nostr messages and message elements.
|
Package codec is a set of interfaces for nostr messages and message elements. |
|
Package config is an implementation of the env.Source interface from go-simpler.org
|
Package config is an implementation of the env.Source interface from go-simpler.org |
|
Package context is a set of shorter names for the very stuttery context library.
|
Package context is a set of shorter names for the very stuttery context library. |
|
Package dns is an implementation of the specification of NIP-05, providing DNS based verification for nostr identities.
|
Package dns is an implementation of the specification of NIP-05, providing DNS based verification for nostr identities. |
|
Package btcec implements support for the elliptic curves needed for bitcoin.
|
Package btcec implements support for the elliptic curves needed for bitcoin. |
|
base58
Package base58 provides an API for working with modified base58 and Base58Check encodings.
|
Package base58 provides an API for working with modified base58 and Base58Check encodings. |
|
bech32
Package bech32 provides a Go implementation of the bech32 format specified in BIP 173.
|
Package bech32 provides a Go implementation of the bech32 format specified in BIP 173. |
|
chaincfg
Package chaincfg provides basic parameters for bitcoin chain and testnets.
|
Package chaincfg provides basic parameters for bitcoin chain and testnets. |
|
chainhash
Package chainhash provides abstracted hash functionality.
|
Package chainhash provides abstracted hash functionality. |
|
ecdsa
Package ecdsa provides secp256k1-optimized ECDSA signing and verification.
|
Package ecdsa provides secp256k1-optimized ECDSA signing and verification. |
|
musig2
Package musig2 provides an implementation of the musig2 protocol for bitcoin.
|
Package musig2 provides an implementation of the musig2 protocol for bitcoin. |
|
schnorr
Package schnorr provides custom Schnorr signing and verification via secp256k1.
|
Package schnorr provides custom Schnorr signing and verification via secp256k1. |
|
secp256k1
Package secp256k1 implements optimized secp256k1 elliptic curve operations in pure Go.
|
Package secp256k1 implements optimized secp256k1 elliptic curve operations in pure Go. |
|
secp256k1/precomps
command
Package main provides a generator for precomputed constants for secp256k1 signatures.
|
Package main provides a generator for precomputed constants for secp256k1 signatures. |
|
taproot
Package taproot provides a collection of tools for encoding bitcoin taproot addresses.
|
Package taproot provides a collection of tools for encoding bitcoin taproot addresses. |
|
wire
Package wire contains a set of data structure definitions for the bitcoin blockchain.
|
Package wire contains a set of data structure definitions for the bitcoin blockchain. |
|
Package encryption contains the message encryption schemes defined in NIP-04 and NIP-44, used for encrypting the content of nostr messages.
|
Package encryption contains the message encryption schemes defined in NIP-04 and NIP-44, used for encrypting the content of nostr messages. |
|
Package envelopes provides common functions for marshaling and identifying nostr envelopes (JSON arrays containing protocol messages).
|
Package envelopes provides common functions for marshaling and identifying nostr envelopes (JSON arrays containing protocol messages). |
|
authenvelope
Package authenvelope defines the auth challenge (relay message) and response (client message) of the NIP-42 authentication protocol.
|
Package authenvelope defines the auth challenge (relay message) and response (client message) of the NIP-42 authentication protocol. |
|
closedenvelope
Package closedenvelope defines the nostr message type CLOSED which is sent from a relay to indicate the relay-side termination of a subscription or the demand for authentication associated with a subscription.
|
Package closedenvelope defines the nostr message type CLOSED which is sent from a relay to indicate the relay-side termination of a subscription or the demand for authentication associated with a subscription. |
|
closeenvelope
Package closeenvelope provides the encoder for the client message CLOSE which is a request to terminate a subscription.
|
Package closeenvelope provides the encoder for the client message CLOSE which is a request to terminate a subscription. |
|
countenvelope
Package countenvelope is an encoder for the COUNT request (client) and response (relay) message types.
|
Package countenvelope is an encoder for the COUNT request (client) and response (relay) message types. |
|
eoseenvelope
Package eoseenvelope provides an encoder for the EOSE (End Of Stored Events) event that signifies that a REQ has found all stored events and from here on the request morphs into a subscription, until the limit, if requested, or until CLOSE or CLOSED.
|
Package eoseenvelope provides an encoder for the EOSE (End Of Stored Events) event that signifies that a REQ has found all stored events and from here on the request morphs into a subscription, until the limit, if requested, or until CLOSE or CLOSED. |
|
eventenvelope
Package eventenvelope is a codec for the event Submission request EVENT envelope (client) and event Result (to a REQ) from a relay.
|
Package eventenvelope is a codec for the event Submission request EVENT envelope (client) and event Result (to a REQ) from a relay. |
|
messages
Package messages is a collection of example/common messages and machine-readable prefixes to use with OK and CLOSED envelopes.
|
Package messages is a collection of example/common messages and machine-readable prefixes to use with OK and CLOSED envelopes. |
|
noticeenvelope
Package noticeenvelope is a codec for the NOTICE envelope, which is used to serve (mostly ignored) messages that are supposed to be shown to a user in the client.
|
Package noticeenvelope is a codec for the NOTICE envelope, which is used to serve (mostly ignored) messages that are supposed to be shown to a user in the client. |
|
okenvelope
Package okenvelope is a codec for the OK message, which is an acknowledgement for an EVENT eventenvelope.Submission, containing true/false and if false a message with a machine readable error type as found in the messages package.
|
Package okenvelope is a codec for the OK message, which is an acknowledgement for an EVENT eventenvelope.Submission, containing true/false and if false a message with a machine readable error type as found in the messages package. |
|
reqenvelope
Package reqenvelope is a message from a client to a relay containing a subscription identifier and an array of filters to search for events.
|
Package reqenvelope is a message from a client to a relay containing a subscription identifier and an array of filters to search for events. |
|
Package event provides a codec for nostr events, for the wire format (with Id and signature), for the canonical form, that is hashed to generate the Id, and a custom format called "wirecompact" which wraps a canonical form with an array and encodes the signature with base64 for a more compact size.
|
Package event provides a codec for nostr events, for the wire format (with Id and signature), for the canonical form, that is hashed to generate the Id, and a custom format called "wirecompact" which wraps a canonical form with an array and encodes the signature with base64 for a more compact size. |
|
codectester
Package codectester is a tester to accept a large volume of (ostensibly valid) event data in a .jsonl (JSON line structured) file and categorize it into subsets that have failed at separate parts of the processing, a tool for testing the event codec.
|
Package codectester is a tester to accept a large volume of (ostensibly valid) event data in a .jsonl (JSON line structured) file and categorize it into subsets that have failed at separate parts of the processing, a tool for testing the event codec. |
|
codectester/divider
command
Package main is a tester that reads in a provided JSON line structured (.jsonl) document containing a set of events and attempts to parse them and prints out the events that failed various steps in the encode/decode process.
|
Package main is a tester that reads in a provided JSON line structured (.jsonl) document containing a set of events and attempts to parse them and prints out the events that failed various steps in the encode/decode process. |
|
examples
Package examples is an embeded jsonl format of a collection of events intended to be used to test an event codec.
|
Package examples is an embeded jsonl format of a collection of events intended to be used to test an event codec. |
|
Package eventid is a codec for managing nostr event Ids (hash of the canonical form of a nostr event).
|
Package eventid is a codec for managing nostr event Ids (hash of the canonical form of a nostr event). |
|
Package filter is a codec for nostr filters (queries) and includes tools for matching them to events, a canonical format scheme to enable compactly identifying subscription filters, and a simplified filter that leavse out the IDs and Search fields for use in the HTTP API.
|
Package filter is a codec for nostr filters (queries) and includes tools for matching them to events, a canonical format scheme to enable compactly identifying subscription filters, and a simplified filter that leavse out the IDs and Search fields for use in the HTTP API. |
|
Package filters is a set of tools for working with multiple nostr filters.
|
Package filters is a set of tools for working with multiple nostr filters. |
|
Package hex is a set of aliases and helpers for using the templexxx SIMD hex encoder.
|
Package hex is a set of aliases and helpers for using the templexxx SIMD hex encoder. |
|
Package httpauth provides helpers and encoders for nostr NIP-98 HTTP authentication header messages and a new JWT authentication message and delegation event kind 13004 that enables time limited expiring delegations of authentication (as with NIP-42 auth) for the HTTP API.
|
Package httpauth provides helpers and encoders for nostr NIP-98 HTTP authentication header messages and a new JWT authentication message and delegation event kind 13004 that enables time limited expiring delegations of authentication (as with NIP-42 auth) for the HTTP API. |
|
Package interrupt is a library for providing handling for Ctrl-C/Interrupt handling and triggering callbacks for such things as closing files, flushing buffers, and other elements of graceful shutdowns.
|
Package interrupt is a library for providing handling for Ctrl-C/Interrupt handling and triggering callbacks for such things as closing files, flushing buffers, and other elements of graceful shutdowns. |
|
Package ints is an optimised encoder for decimal numbers in ASCII format, that simplifies and accelerates encoding and decoding decimal strings.
|
Package ints is an optimised encoder for decimal numbers in ASCII format, that simplifies and accelerates encoding and decoding decimal strings. |
|
gen
command
Package main is a generator for the base10000 (4 digit) encoding of the ints library.
|
Package main is a generator for the base10000 (4 digit) encoding of the ints library. |
|
Package json is a collection of primitives for fast encoding and decoding of minified JSON, intended to eventually replace most of the event and filter encoder and others, built as part of the beginnings of a Go NWC protocol implementation.
|
Package json is a collection of primitives for fast encoding and decoding of minified JSON, intended to eventually replace most of the event and filter encoder and others, built as part of the beginnings of a Go NWC protocol implementation. |
|
Package keys is a set of helpers for generating and converting public/secret keys to hex and back to binary.
|
Package keys is a set of helpers for generating and converting public/secret keys to hex and back to binary. |
|
Package kind includes a type for convenient handling of event kinds, and a kind database with reverse lookup for human-readable information about event kinds.
|
Package kind includes a type for convenient handling of event kinds, and a kind database with reverse lookup for human-readable information about event kinds. |
|
Package kinds is a set of helpers for dealing with lists of kind numbers including comparisons and encoding.
|
Package kinds is a set of helpers for dealing with lists of kind numbers including comparisons and encoding. |
|
Package layer2 is a library for building nostr event stores with two separate data storage systems, primarily for creating size limited caches with larger stores backing them, to enable scaling providing access to an event store to more users more quickly via a caching strategy.
|
Package layer2 is a library for building nostr event stores with two separate data storage systems, primarily for creating size limited caches with larger stores backing them, to enable scaling providing access to an event store to more users more quickly via a caching strategy. |
|
badgerbadger
Package badgerbadger is a test of the layer 2 that uses two instances of the ratel event store, meant for testing the layer 2 protocol with two tiers of the database a size limited cache and a large non-purging store.
|
Package badgerbadger is a test of the layer 2 that uses two instances of the ratel event store, meant for testing the layer 2 protocol with two tiers of the database a size limited cache and a large non-purging store. |
|
badgerbadger/tester
command
Package main is a tester for a layer2 database scheme with one ratel DB with cache and the second not, testing the maintenance of the cache utilization and second level being accessed to fetch events that have been pruned out of the cache.
|
Package main is a tester for a layer2 database scheme with one ratel DB with cache and the second not, testing the maintenance of the cache utilization and second level being accessed to fetch events that have been pruned out of the cache. |
|
Package lol (log of location) is a simple logging library that prints a high precision unix timestamp and the source location of a log print to make tracing errors simpler.
|
Package lol (log of location) is a simple logging library that prints a high precision unix timestamp and the source location of a log print to make tracing errors simpler. |
|
Package normalize is a set of tools for cleaning up URL s and formatting nostr OK and CLOSED messages.
|
Package normalize is a set of tools for cleaning up URL s and formatting nostr OK and CLOSED messages. |
|
Package number implements a simple number list, used with relayinfo package for NIP support lists.
|
Package number implements a simple number list, used with relayinfo package for NIP support lists. |
|
Package nwc is an implementation of the NWC Nostr Wallet Connect protocol for communicating with lightning (and potentially other kinds of wallets) using nostr ephemeral event messages.
|
Package nwc is an implementation of the NWC Nostr Wallet Connect protocol for communicating with lightning (and potentially other kinds of wallets) using nostr ephemeral event messages. |
|
Package p256k is a signer interface that (by default) uses the bitcoin/libsecp256k1 library for fast signature creation and verification of the BIP-340 nostr X-only signatures and public keys, and ECDH.
|
Package p256k is a signer interface that (by default) uses the bitcoin/libsecp256k1 library for fast signature creation and verification of the BIP-340 nostr X-only signatures and public keys, and ECDH. |
|
btcec
Package btcec implements the signer.I interface for signatures and ECDH with nostr.
|
Package btcec implements the signer.I interface for signatures and ECDH with nostr. |
|
Package qu is a library for making handling signal (chan struct{}) channels simpler, as well as monitoring the state of the signal channels in an application.
|
Package qu is a library for making handling signal (chan struct{}) channels simpler, as well as monitoring the state of the signal channels in an application. |
|
Package ratel is a badger DB based event store with optional cache management and capability to be used as a pruning cache along with a secondary larger event store.
|
Package ratel is a badger DB based event store with optional cache management and capability to be used as a pruning cache along with a secondary larger event store. |
|
del
Package del is a simple sorted list for database keys, primarily used to collect lists of events that need to be deleted either by expiration or for the garbage collector.
|
Package del is a simple sorted list for database keys, primarily used to collect lists of events that need to be deleted either by expiration or for the garbage collector. |
|
keys
Package keys is a composable framework for constructing badger keys from fields of events.
|
Package keys is a composable framework for constructing badger keys from fields of events. |
|
keys/arb
Package arb implements arbitrary length byte keys.Element.
|
Package arb implements arbitrary length byte keys.Element. |
|
keys/count
Package count contains a series of data types for managing lists of indexes for garbage collection.
|
Package count contains a series of data types for managing lists of indexes for garbage collection. |
|
keys/createdat
Package createdat implements a badger key index keys.Element for timestamps.
|
Package createdat implements a badger key index keys.Element for timestamps. |
|
keys/fullid
Package fullid implements a keys.Element for a complete 32 byte event Ids.
|
Package fullid implements a keys.Element for a complete 32 byte event Ids. |
|
keys/fullpubkey
Package fullpubkey implements a keys.Element for a complete 32 byte nostr pubkeys.
|
Package fullpubkey implements a keys.Element for a complete 32 byte nostr pubkeys. |
|
keys/id
Package id implements a keys.Element for a truncated event Ids containing the first 8 bytes of an eventid.T.
|
Package id implements a keys.Element for a truncated event Ids containing the first 8 bytes of an eventid.T. |
|
keys/index
Package index implements the single byte prefix of the database keys.
|
Package index implements the single byte prefix of the database keys. |
|
keys/kinder
Package kinder implements a keys.Element for the 16 bit nostr 'kind' value for use in indexes.
|
Package kinder implements a keys.Element for the 16 bit nostr 'kind' value for use in indexes. |
|
keys/pubkey
Package pubkey implements an 8 byte truncated public key implementation of a keys.Element.
|
Package pubkey implements an 8 byte truncated public key implementation of a keys.Element. |
|
keys/serial
Package serial implements a keys.Element for encoding a serial (monotonic 64 bit counter) for stored events, used to link an index to the main data table.
|
Package serial implements a keys.Element for encoding a serial (monotonic 64 bit counter) for stored events, used to link an index to the main data table. |
|
keys/tombstone
Package tombstone is a 16 byte truncated event Id for keys.Element used to mark an event as being deleted so it isn't saved again.
|
Package tombstone is a 16 byte truncated event Id for keys.Element used to mark an event as being deleted so it isn't saved again. |
|
prefixes
Package prefixes provides a list of the index.P types that designate tables in the ratel event store, as well as enabling a simple syntax to assemble and decompose an index key into its keys.Element s.
|
Package prefixes provides a list of the index.P types that designate tables in the ratel event store, as well as enabling a simple syntax to assemble and decompose an index key into its keys.Element s. |
|
Package realy implements a nostr relay including the new HTTP API built with huma.
|
Package realy implements a nostr relay including the new HTTP API built with huma. |
|
config
Package config provides a go-simpler.org/env configuration table and helpers for working with the list of key/value lists stored in .env files.
|
Package config provides a go-simpler.org/env configuration table and helpers for working with the list of key/value lists stored in .env files. |
|
options
Package options provides some option configurations for the realy relay.
|
Package options provides some option configurations for the realy relay. |
|
publish
Package publisher is a singleton package that keeps track of subscriptions in both websockets and http SSE, including managing the authentication state of a connection.
|
Package publisher is a singleton package that keeps track of subscriptions in both websockets and http SSE, including managing the authentication state of a connection. |
|
Package relay contains a collection of interfaces for enabling the building of modular nostr relay implementations.
|
Package relay contains a collection of interfaces for enabling the building of modular nostr relay implementations. |
|
Package relayinfo defines the types and helpers for working with NIP-11 relay Information Document.
|
Package relayinfo defines the types and helpers for working with NIP-11 relay Information Document. |
|
Package sha256 is taken from github.com/minio/sha256-simd, implementing, where available, an accelerated SIMD implementation of sha256.
|
Package sha256 is taken from github.com/minio/sha256-simd, implementing, where available, an accelerated SIMD implementation of sha256. |
|
Package signer defines interfaces for management of signatures, used to abstract the signature algorithm from the usage.
|
Package signer defines interfaces for management of signatures, used to abstract the signature algorithm from the usage. |
|
Package store is an interface and ancillary helpers and types for defining a series of API elements for abstracting the event storage from the implementation.
|
Package store is an interface and ancillary helpers and types for defining a series of API elements for abstracting the event storage from the implementation. |
|
Package subscription is a set of helpers for managing nostr websocket subscription Ids, used with the REQ method to maintain an association between a REQ and resultant messages such as EVENT and CLOSED.
|
Package subscription is a set of helpers for managing nostr websocket subscription Ids, used with the REQ method to maintain an association between a REQ and resultant messages such as EVENT and CLOSED. |
|
Package tag provides an implementation of a nostr tag list, an array of strings with a usually single letter first "key" field, including methods to compare, marshal/unmarshal and access elements with their proper semantics.
|
Package tag provides an implementation of a nostr tag list, an array of strings with a usually single letter first "key" field, including methods to compare, marshal/unmarshal and access elements with their proper semantics. |
|
atag
Package atag implements a special, optimized handling for keeping a tags (address) in a more memory efficient form while working with these tags.
|
Package atag implements a special, optimized handling for keeping a tags (address) in a more memory efficient form while working with these tags. |
|
Package tags provides a set of tools for composing and searching lists of tag.T as well as marshal/unmarshal to JSON.
|
Package tags provides a set of tools for composing and searching lists of tag.T as well as marshal/unmarshal to JSON. |
|
Package tests provides a tool to generate arbitrary random events for fuzz testing the encoder.
|
Package tests provides a tool to generate arbitrary random events for fuzz testing the encoder. |
|
Package text is a collection of helpers for working with text inside nostr events such as implementing the string escaping scheme defined in NIP-01.
|
Package text is a collection of helpers for working with text inside nostr events such as implementing the string escaping scheme defined in NIP-01. |
|
Package timestamp is a set of helpers for working with timestamps including encoding and conversion to various integer forms, from time.Time and varints.
|
Package timestamp is a set of helpers for working with timestamps including encoding and conversion to various integer forms, from time.Time and varints. |
|
Package units is a convenient set of names designating data sizes in bytes using common ISO names (base 10).
|
Package units is a convenient set of names designating data sizes in bytes using common ISO names (base 10). |
|
Package ws provides both relay and client websocket implementations including a pool for fanning out to multiple relays, and managing subscriptions.
|
Package ws provides both relay and client websocket implementations including a pool for fanning out to multiple relays, and managing subscriptions. |
Click to show internal directories.
Click to hide internal directories.