nodeks

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MPL-2.0 Imports: 7 Imported by: 0 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 nodeks loads or creates the daemon DHT node identity (node.key).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is a single-identity crypto.KeyStore for the DHT node (not an app Agent).

func LoadOrGenerate

func LoadOrGenerate(keyPath string) (*Store, error)

LoadOrGenerate reads hex-encoded 64-byte Ed25519 private key from path, or creates one.

func (*Store) Address

func (s *Store) Address() a2al.Address

Address returns the node's A2AL address (DHT identity).

func (*Store) Ed25519PrivateKey

func (s *Store) Ed25519PrivateKey(addr a2al.Address) (ed25519.PrivateKey, error)

Ed25519PrivateKey implements the optional host.KeyStore exporter.

func (*Store) Generate

func (s *Store) Generate(crypto.KeyType) (crypto.PrivateKey, error)

Generate implements crypto.KeyStore (unsupported).

func (*Store) List

func (s *Store) List() ([]a2al.Address, error)

List implements crypto.KeyStore.

func (*Store) PrivateKey

func (s *Store) PrivateKey() ed25519.PrivateKey

PrivateKey returns the node's Ed25519 private key for QUIC.

func (*Store) PublicKey

func (s *Store) PublicKey(addr a2al.Address) ([]byte, error)

PublicKey implements crypto.KeyStore.

func (*Store) Sign

func (s *Store) Sign(addr a2al.Address, data []byte) ([]byte, error)

Sign implements crypto.KeyStore.

Jump to

Keyboard shortcuts

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