pairing

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package pairing provides the throwaway ephemeral-address helpers used by the resolver and the PutRecord path to recognise non-routable pairing addresses.

NOTE (open-dmcn reference implementation): the full device-pairing / key-clone flow (CloneRequest/CloneResponse control payloads) is a PRODUCT extension and is intentionally omitted here. Only the ephemeral-address predicate + record helpers remain, so `internal/node/resolver.go` and `internal/relay/putrecord.go` compile and behave correctly (a reference node never mints pairing addresses, so those branches are inert).

Index

Constants

View Source
const (
	// EphemeralDomain is the domain used for throwaway ephemeral pairing
	// addresses. They are never real, registered, or routable as email.
	EphemeralDomain = "pairing.local"

	// EphemeralTTL is how long the ephemeral identity record stays valid. It is
	// single-use; this just bounds how long an abandoned record lingers.
	EphemeralTTL = 15 * time.Minute
)

Variables

This section is empty.

Functions

func EphemeralAddress

func EphemeralAddress() (string, error)

EphemeralAddress returns a fresh, unique throwaway address for an ephemeral pairing identity.

func IsEphemeralAddress

func IsEphemeralAddress(addr string) bool

IsEphemeralAddress reports whether addr is a throwaway device-pairing address on the reserved EphemeralDomain. These addresses are never real, registered, or routable as email, so callers may treat their records as powerless throwaways.

func NewEphemeralRecord

func NewEphemeralRecord(address string, kp *identity.IdentityKeyPair, relayHint string, now time.Time) (*identity.IdentityRecord, error)

NewEphemeralRecord builds a self-signed, tier-0 IdentityRecord for an ephemeral pairing identity, with the given relay as its only hint and a short expiry.

Types

This section is empty.

Jump to

Keyboard shortcuts

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