encoders/

directory
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: Unlicense

Directories

Path Synopsis
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 codecbuf provides a concurrent-safe bytes buffer pool for encoding data.
Package codecbuf provides a concurrent-safe bytes buffer pool for encoding data.
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 fast binary form that uses io.Reader/io.Writer.
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 fast binary form that uses io.Reader/io.Writer.
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 embedded jsonl format of a collection of events intended to be used to test an event codec.
Package examples is an embedded 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 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 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 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.
tag
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 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 varint is a variable integer encoding that works in reverse compared to the stdlib binary Varint.
Package varint is a variable integer encoding that works in reverse compared to the stdlib binary Varint.

Jump to

Keyboard shortcuts

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