improve fast equal API, add bech32 encoding handling
This commit is contained in:
31
pkg/encoders/bech32encoding/pointers/pointers.go
Normal file
31
pkg/encoders/bech32encoding/pointers/pointers.go
Normal file
@@ -0,0 +1,31 @@
|
||||
// Package pointers is a set of basic nip-19 data types for generating bech32
|
||||
// encoded nostr entities.
|
||||
package pointers
|
||||
|
||||
import (
|
||||
"encoders.orly/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"`
|
||||
}
|
||||
Reference in New Issue
Block a user