nip48

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Unlicense Imports: 3 Imported by: 0

Documentation

Overview

Package nip48 implements NIP-48: Proxy tags, which let an event declare that it originated on another protocol (ActivityPub, AT Protocol, RSS, or the web) and reference its source object there.

Index

Constants

View Source
const (
	ProtocolActivityPub = "activitypub"
	ProtocolATProto     = "atproto"
	ProtocolRSS         = "rss"
	ProtocolWeb         = "web"
)

Known protocol identifiers for the proxy tag's third element.

View Source
const (
	TagNameProxy = "proxy"
)

Variables

This section is empty.

Functions

func AddProxyTag

func AddProxyTag(ev *nip01.Event, id, protocol string)

AddProxyTag appends a ["proxy", id, protocol] tag to ev.

func ValidateProxyTag

func ValidateProxyTag(event *nip01.Event) error

ValidateProxyTag checks the structural shape of event's proxy tag, if any. An event without a proxy tag is valid — NIP-48 is opt-in per event.

Types

type ProxyTag

type ProxyTag struct {
	ID       string
	Protocol string
}

ProxyTag is a parsed ["proxy", <id>, <protocol>] tag.

func ParseProxyTag

func ParseProxyTag(event *nip01.Event) (*ProxyTag, error)

ParseProxyTag extracts the proxy tag from event, if present.

Directories

Path Synopsis
Package relayreg declares NIP-48 support to a relay engine.
Package relayreg declares NIP-48 support to a relay engine.

Jump to

Keyboard shortcuts

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