Files
next.orly.dev/pkg/encoders/bech32encoding/pointers/pointers.go
mleku 110223fc4e Migrate internal module imports to unified package path.
Replaced legacy `*.orly` module imports with `next.orly.dev/pkg` paths across the codebase for consistency. Removed legacy `go.mod` files from sub-packages, consolidating dependency management. Added Dockerfiles and configurations for benchmarking environments.
2025-09-12 16:12:31 +01:00

32 lines
905 B
Go

// Package pointers is a set of basic nip-19 data types for generating bech32
// encoded nostr entities.
package pointers
import (
"next.orly.dev/pkg/encoders/kind"
)
// Profile pointer is a combination of pubkey and relay list.
type Profile struct {
PublicKey []byte `json:"pubkey"`
Relays [][]byte `json:"relays,omitempty"`
}
// Event pointer is the combination of an event ID, relay hints, author, pubkey,
// and kind.
type Event struct {
ID []byte `json:"id"`
Relays [][]byte `json:"relays,omitempty"`
Author []byte `json:"author,omitempty"`
Kind *kind.K `json:"kind,omitempty"`
}
// Entity is the combination of a pubkey, kind, arbitrary identifier, and relay
// hints.
type Entity struct {
PublicKey []byte `json:"pubkey"`
Kind *kind.K `json:"kind,omitempty"`
Identifier []byte `json:"identifier,omitempty"`
Relays [][]byte `json:"relays,omitempty"`
}