Skip to content

otplib API Documentation / @otplib/core / errors / AlgorithmUnsupportedContext

Type Alias: AlgorithmUnsupportedContext

AlgorithmUnsupportedContext = object

Defined in: packages/core/src/errors.ts:188

Additional context for AlgorithmUnsupportedError

Properties

plugin?

optional plugin?: string

Defined in: packages/core/src/errors.ts:203

Name of the crypto plugin that rejected the value, when applicable.


supported?

optional supported?: readonly string[]

Defined in: packages/core/src/errors.ts:198

The algorithms accepted at the point of failure.

Supplied by the caller rather than defaulted here: this module has no business restating the allowlist, and errors.ts cannot import it from utils.ts without an import cycle. Every thrower inside the library passes it. Omitting it drops the "Expected one of" clause rather than guessing, so the message never names a set the caller did not vouch for.

Released under the MIT License.