| 1 | package event |
| 2 | |
| 3 | import "github.com/FelineStateMachine/tinyrelay/protocol/nostr" |
| 4 | |
| 5 | // Event is the public Nostr wire value. The alias keeps feature consumers |
| 6 | // source-compatible while they migrate to protocol/nostr. |
| 7 | type Event = nostr.Event |
| 8 | |
| 9 | func Validate(e Event) error { return nostr.Validate(e) } |
| 10 | func Parse(raw []byte) (Event, error) { return nostr.Parse(raw) } |
| 11 | func Canonical(e Event) ([]byte, error) { return nostr.Canonical(e) } |
| 12 | func Tag(e Event, name string) string { return nostr.Tag(e, name) } |
| 13 | func TagValues(e Event, name string) []string { return nostr.TagValues(e, name) } |
| 14 | func Expiration(e Event) int64 { return nostr.Expiration(e) } |
| 15 | func Difficulty(id string) int { return nostr.Difficulty(id) } |
| 16 | func CommittedDifficulty(e Event) int { return nostr.CommittedDifficulty(e) } |
| 17 | func Sign(e *Event, secretHex string) error { return nostr.Sign(e, secretHex) } |
| 18 | func GenerateKey() (string, error) { return nostr.GenerateKey() } |
| 19 | func PublicKey(secretHex string) (string, error) { return nostr.PublicKey(secretHex) } |
| 20 | func IsEphemeral(k int) bool { return nostr.IsEphemeral(k) } |
| 21 | func IsReplaceable(k int) bool { return nostr.IsReplaceable(k) } |
| 22 | func IsAddressable(k int) bool { return nostr.IsAddressable(k) } |
| 23 | |
| 24 | // IsPrivate is the host's recipient-scoped kind classification, not a generic |
| 25 | // Nostr range. Keep feature privacy decisions outside protocol/nostr. |
| 26 | func IsPrivate(k int) bool { |
| 27 | return k == 4 || k == 13 || k == KIND_WRAP || k == 21059 || k == KIND_NOSTR_CONNECT || k == KIND_PUSH_REGISTRATION |
| 28 | } |