Skip to Content
API referenceSIWX ServerSrcClassesMemorySiwxNonceStore

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


MemorySiwxNonceStore

Defined in: packages/siwx-server/src/server.ts:386 

In-memory implementation of SiwxNonceStore. STRICTLY for local development, prototyping, and unit testing. Fails closed in production environments.

Implements

Constructors

Constructor

new MemorySiwxNonceStore(options?): MemorySiwxNonceStore

Defined in: packages/siwx-server/src/server.ts:389 

Parameters

options?
allowInProduction?

boolean

Returns

MemorySiwxNonceStore

Methods

consume()

consume(input): Promise<boolean>

Defined in: packages/siwx-server/src/server.ts:405 

Atomically consumes a nonce, guaranteeing single-use.

Parameters

input
nonce

string

The nonce string to consume.

Returns

Promise<boolean>

True if the nonce was valid and consumed, false if already consumed or expired.

Implementation of

SiwxNonceStore.consume


issue()

issue(input): Promise<void>

Defined in: packages/siwx-server/src/server.ts:400 

Issues and stores a new challenge nonce with TTL.

Parameters

input
nonce

string

The unique nonce string.

ttlSeconds

number

Time-to-live in seconds (typically 300s).

Returns

Promise<void>

Implementation of

SiwxNonceStore.issue

Last updated on