common

module
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: AGPL-3.0

README

common

ci codecov

Shared Go helpers for the Pilot Protocol. A small, pure-stdlib library with subpackages for durable file writes (fsutil) and Ed25519 identity operations (crypto).

Install

import (
    "github.com/pilot-protocol/common/fsutil"
    "github.com/pilot-protocol/common/crypto"
)

Usage

// Atomic file write — temp file + fsync + rename.
if err := fsutil.AtomicWrite(path, blob); err != nil {
    return err
}

// Ed25519 keypair + node-ID derivation.
id, err := crypto.NewIdentity()
sig := id.Sign(msg)
ok := crypto.Verify(id.PublicKey, msg, sig)

Layout

Package What it does
fsutil AtomicWrite(path, data), AppendSync(path, data) — durable file writes.
crypto Identity — Ed25519 keypair + node-ID derivation, signing, verification.

License

AGPL-3.0-or-later. See LICENSE.

// fix typo in docs

Directories

Path Synopsis
Package badgeverify defines the canonical wire format for a Pilot "verified address" badge and an offline verifier for it.
Package badgeverify defines the canonical wire format for a Pilot "verified address" badge and an offline verifier for it.
Package consent provides opt-out consent flags stored in ~/.pilot/config.json.
Package consent provides opt-out consent flags stored in ~/.pilot/config.json.
Package coreapi defines the L10 plugin runtime contract.
Package coreapi defines the L10 plugin runtime contract.
Package daemonapi is the dependency-free contract layer between the daemon engine and its plugins.
Package daemonapi is the dependency-free contract layer between the daemon engine and its plugins.
registry
wire
Package wire defines the binary wire format shared between the registry client and server.
Package wire defines the binary wire format shared between the registry client and server.
Package reqsig implements the canonical request-signature envelope used to prove that a request originates from a registered Pilot node, and the registry-signed verdict returned by verification endpoints.
Package reqsig implements the canonical request-signature envelope used to prove that a request originates from a registered Pilot node, and the registry-signed verdict returned by verification endpoints.
Package urlvalidate provides SSRF-prevention checks shared across packages that accept operator-supplied URLs (webhook endpoints, audit export sinks, identity provider verification callbacks, etc.).
Package urlvalidate provides SSRF-prevention checks shared across packages that accept operator-supplied URLs (webhook endpoints, audit export sinks, identity provider verification callbacks, etc.).

Jump to

Keyboard shortcuts

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