Skip to Content
API referenceSIWX CoreSrcComponentsvalidatePolicy()

API Reference — @tuwaio/siwx (CAIP-122 Authentication Layer)


validatePolicy()

validatePolicy(fields, policy?, now?): string[]

Defined in: packages/siwx-core/src/validateMessage.ts:136 

Validates a CAIP-122 message object against an optional verification policy.

Parameters

fields

SiwxMessageFields

The message fields to validate.

policy?

SiwxVerificationPolicy

The verification policy to enforce.

now?

Date = ...

Reference date for timestamp validations (defaults to new Date()).

Returns

string[]

An array of policy violation error messages.

Last updated on