Help us shape the future of Go! Take the 2026 Go Developer Survey

approvalhash

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package approvalhash implements the server's versioned approval hash for a node's reader-visible title, abstract, and content (server #1591).

Index

Constants

View Source
const Version = "hadron-approval-v1"

Variables

This section is empty.

Functions

func Canonical

func Canonical(fields Fields) []byte

Canonical returns the exact v1 bytes hashed by hadron-server. The field order and length-prefixed format are a wire contract; a change needs a new version rather than an edit to this serializer.

func Hash

func Hash(fields Fields) string

Hash is the full lowercase hexadecimal SHA-256 of Canonical(fields).

Types

type Fields

type Fields struct {
	Title    *string
	Abstract *string
	Content  *string
}

Fields are the three values covered by an approval. Title is Node.name. A nil pointer is distinct from a pointer to the empty string.

Jump to

Keyboard shortcuts

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