nostr

module
v1.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2024 License: CC0-1.0, MIT

README

nostr

Go library for working with the nostr social network protocol.

Derived from go-nostr and reworked, rewritten, and several parts completely replaced.

Defines a logical, human readable namespace for all of the elements in the protocol instead of using stupid NIP numbers which are not human readable.

JSON handling has been written so that all objects and arrays are marshaled without reflection, but standard unmarshaling via encoding/json is used rather than reinvent the wheel. The reason for this is that the standard library marshaling encodes 4 digit unicode escapes and this is not compliant with the specification of nostr NIP-01 (see the last section of this for the specification of what string escaping is done). Beware that this may sometimes mean that historical events may not unmarshal and re-marshal to the same structure and thus invalidate the signatures.

This library has been thoroughly tested via its use in replicatr and is being migrated to its own hosting in order to have prettier import addresses and because fuck github and microsoft.

Directories

Path Synopsis
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.
interfaces
Package pool is
Package pool is
wire
array
Package array implements an interface slice data structure that produces JSON as its string/byte string output.
Package array implements an interface slice data structure that produces JSON as its string/byte string output.
object
Package object implements an ordered key/value data structure for use with JSON documents that must be strictly ordered in order to create a consistent blob of data in canonical order for creating verifiable signatures while delivering the data over the wire or storing it with its signature and object hash also present, as is used for nostr events.
Package object implements an ordered key/value data structure for use with JSON documents that must be strictly ordered in order to create a consistent blob of data in canonical order for creating verifiable signatures while delivering the data over the wire or storing it with its signature and object hash also present, as is used for nostr events.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL