Versions in this module Expand all Collapse all v0 v0.1.1 Nov 12, 2026 v0.1.0 Oct 14, 2026 Changes in this version + const AlgorithmSHA256 + const AnnotationVerified + const DefaultChallengeTTL + const DefaultDifficulty + const EndpointChallenge + const MaxChallengeTTL + const MaxDifficulty + const PluginName + const ProofHeader + const PurposeChallenge + var ErrChallengeInvalid = auth.NewError("pow.challenge_invalid", http.StatusBadRequest, ...) + var ErrProofInvalid = auth.NewError("pow.proof_invalid", http.StatusForbidden, ...) + func Solve(ctx context.Context, ch Challenge) (string, error) + type Challenge struct + Algorithm string + Challenge string + Difficulty int + ExpiresAt time.Time + type Option func(*Plugin) + func ChallengeTTL(d time.Duration) Option + func Difficulty(bitsRequired int) Option + func WithHeader(name string) Option + type Plugin struct + func New(opts ...Option) *Plugin + func (p *Plugin) Challenge(ctx context.Context) (Challenge, error) + func (p *Plugin) Init(a *auth.Auth) error + func (p *Plugin) Name() string + func (p *Plugin) Operations() []auth.Operation + func (p *Plugin) OptionErr() error + func (p *Plugin) PassChallenge(ctx context.Context, c *auth.Call) error + func (p *Plugin) RateLimits() []auth.RateRule