SiwxApiHandlerOptions
Defined in: siwx-server/src/next.ts:38
Properties
cookieOptions?
optionalcookieOptions?:CookieOptions
Defined in: siwx-server/src/next.ts:60
Attributes of the session cookie. maxAge is replaced by the session TTL.
jwt?
optionaljwt?:SiwxJwtOptions
Defined in: siwx-server/src/next.ts:78
Enables GET …/token and GET …/jwks: a short-lived JWT for the signed-in wallet and the public keys that verify
it, for services that accept a sign-in only as a JWT (embedded wallet providers with custom authentication such as
Coinbase CDP, identity platforms, your own services). Without it both paths return 404.
nonceStore
nonceStore:
SiwxNonceStore
Defined in: siwx-server/src/next.ts:49
Durable single-use nonce store shared by every server instance (your Redis or database implementation;
MemorySiwxNonceStore in development and tests).
policy?
optionalpolicy?:SiwxVerificationPolicy
Defined in: siwx-server/src/next.ts:55
Policy enforced by POST /verify (domain, URI, chains, timing). Set at least expectedDomain: without a policy
the message domain is not checked.
sessionStore
sessionStore:
SiwxSessionStore
Defined in: siwx-server/src/next.ts:43
Durable session store shared by every server instance (your Redis or database implementation;
MemorySiwxSessionStore in development and tests).
ttlSeconds?
optionalttlSeconds?:number
Defined in: siwx-server/src/next.ts:72
Session lifetime in seconds, used for the store record and the cookie Max-Age. Defaults to
cookieOptions.maxAge, then to 604800 (7 days).
verifyOptions?
optionalverifyOptions?:Omit<ServerVerifyOptions,"policy"|"usedNonces">
Defined in: siwx-server/src/next.ts:66
Extra options of verifySiwxPayload, for example publicClient (a client, or a function of the chain number) for
smart contract wallets.