pkarr

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pkarr exposes go-iroh's pkarr signed DNS packet codec.

It is a thin re-export of the internal implementation so sibling modules can build compatible pkarr records without duplicating the wire codec.

The Go API is not stable before v1 and may change in any v0 release.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPacketTooLarge = internalpkarr.ErrPacketTooLarge
	ErrTooShort       = internalpkarr.ErrTooShort
	ErrTooLarge       = internalpkarr.ErrTooLarge
	ErrSignature      = internalpkarr.ErrSignature
	ErrDNS            = internalpkarr.ErrDNS
	ErrInvalidKey     = internalpkarr.ErrInvalidKey
)

Functions

This section is empty.

Types

type SignedPacket

type SignedPacket = internalpkarr.SignedPacket

func FromBytes

func FromBytes(b []byte) (*SignedPacket, error)

FromBytes parses and verifies a signed packet from its wire representation.

func FromBytesUnchecked

func FromBytesUnchecked(b []byte) (*SignedPacket, error)

FromBytesUnchecked parses a signed packet without verifying its signature.

func FromRelayPayload

func FromRelayPayload(pub key.PublicKey, payload []byte) (*SignedPacket, error)

FromRelayPayload reconstructs a signed packet from a public key and relay payload.

func FromTxtStrings

func FromTxtStrings(sk key.SecretKey, name string, values []string, ttl uint32) (*SignedPacket, error)

FromTxtStrings creates a signed packet containing TXT records.

type Timestamp

type Timestamp = internalpkarr.Timestamp

func Now

func Now() Timestamp

Now returns a strictly monotonic timestamp.

func TimestampFromMicros

func TimestampFromMicros(micros uint64) Timestamp

TimestampFromMicros returns a timestamp from microseconds since the UNIX epoch.

Jump to

Keyboard shortcuts

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