Versions in this module Expand all Collapse all v0 v0.2.0 Dec 1, 2025 v0.1.0 Nov 28, 2025 Changes in this version + var ErrInvalidKey = errors.New("invalid key") + var ErrInvalidPrefixLength = errors.New("invalid prefix length") + var ErrKeyNotFound = errors.New("no records could be found") + func Decrypt(ciphertext, nonce string) (plaintext string, err error) + func Encrypt(plaintext, nonce string) (string, error) + func GetSecret() string + type Record struct + CreatedAt time.Time + Id uint64 + PrivateKey string + PublicKey string + State State + func CreateKey() (*Record, error) + func GrindKey(prefix string) (*Record, error) + func (r *Record) Clone() Record + func (r *Record) CopyTo(dst *Record) + func (r *Record) GetPrivateKey() (ed25519.PrivateKey, error) + func (r *Record) GetPublicKey() (ed25519.PublicKey, error) + func (r *Record) IsAvailable() bool + func (r *Record) IsDeprecated() bool + func (r *Record) IsReserved() bool + func (r *Record) IsRevoked() bool + func (r *Record) Validate() error + type State uint + const StateAvailable + const StateDeprecated + const StateReserved + const StateRevoked + const StateUnknown + type Store interface + Count func(ctx context.Context) (uint64, error) + CountByState func(ctx context.Context, state State) (uint64, error) + Get func(ctx context.Context, pubkey string) (*Record, error) + GetAllByState func(ctx context.Context, state State, cursor query.Cursor, limit uint64, ...) ([]*Record, error) + Save func(ctx context.Context, record *Record) error