Skip to content

otplib API Documentation / @otplib/hotp / HOTPGenerateOptions

Type Alias: HOTPGenerateOptions

HOTPGenerateOptions = HOTPOptions & object

Defined in: hotp/src/types.ts:53

Required options for HOTP generation

Requires secret, counter, and crypto for OTP generation. Optional guardrails must be created via createGuardrails() factory.

Type Declaration

counter

readonly counter: number | bigint

crypto

readonly crypto: CryptoPlugin

secret

readonly secret: string | Uint8Array

Released under the MIT License.