package
1.2.0
Repository: https://github.com/frankbraun/codechain.git
Documentation: pkg.go.dev

# Packages

Package command implements the ssotpub commands.

# Functions

Load and verify a base64 encoded signed head from filename.
LookupHead and verify base64 encoded signed head from dns.
LookupURLs looks up all URLs from dns and returns it.
MarshalText marshals signed head as text (for status output).
ReadRotateTo reads "rotate to" file from given filename and returns the public key to rotate to and a bool indicating if the rotation time has been reached.
RotateFile rotates the pkgDir/signed_head to pkgDir/previous_signed_head and saves signed head sh to pkgDir/signed_head.
SignHead signs the given Codechain head.
SignHeadV2 signs the given Codechain head.
TXTPrintHead prints the TXT record to publish the signed head.
TXTPrintURL prints the TXT record to publish the url.
Unmarshal and verify a base64 encoded signed head.
Valid checks if the signed head sh is currently valid (as defined by validFrom and validTo).
WriteRotateTo writes "rotate to" file to given filename.

# Constants

File defines the default file name for a signed head.
30d.
1h.
10m.

# Variables

ErrSignedHeadExpired is returned if the validity of a signed head is expired.
ErrSignedHeadFuture is returned if the validity of a signed head is in the future.
ErrSignedHeadSignature is returned if a signed head signature does not verify.
ErrValidityTooLong is returned if the validity is too long.
ErrValidityTooShort is returned if the validity is too short.

# Structs

SignedHeadV1 is a signed Codechain head ready for publication as a SSOT with DNS TXT records (version 1).
SignedHeadV2 is a signed Codechain head ready for publication as a SSOT with DNS TXT records (version 2).

# Interfaces

SignedHead is a signed Codechain head ready for publication as a SSOT with DNS TXT records.