nodeks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

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