From 44cedd652a20d06d680db42d0c595788844df8e7 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 01:22:59 +0000 Subject: [PATCH] docs: add detailed parameter documentation for SIWX custom interface - Add comprehensive SIWXConfig Parameters section to match SIWE documentation format - Include detailed documentation for signOutOnDisconnect parameter with type, default value, and description - Improve documentation consistency between SIWE and SIWX implementations - Addresses GitHub comment about missing signOutOnDisconnect documentation in SIWX custom interface Co-Authored-By: TomTom --- snippets/appkit/shared/siwx/siwx-custom.mdx | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/snippets/appkit/shared/siwx/siwx-custom.mdx b/snippets/appkit/shared/siwx/siwx-custom.mdx index f50b62684..7da6f97da 100644 --- a/snippets/appkit/shared/siwx/siwx-custom.mdx +++ b/snippets/appkit/shared/siwx/siwx-custom.mdx @@ -232,6 +232,38 @@ interface SIWXConfig { } ``` +### SIWXConfig Parameters + +#### createMessage `(input: SIWXMessage.Input) => Promise` + +This method will be called to create a new message to be signed by the user. The message must be unique and contain all the necessary information to verify the user's identity. + +#### addSession `(session: SIWXSession) => Promise` + +This method will be called to store a new single session. It must verify if the session is valid and store it in the storage successfully. + +#### revokeSession `(chainId: CaipNetworkId, address: string) => Promise` + +This method will be called to revoke all the sessions stored for a specific chain and address. It must delete all the sessions stored for the specific chain and address successfully. + +#### setSessions `(sessions: SIWXSession[]) => Promise` + +This method will be called to replace all the sessions in the storage with the new ones. It must verify all the sessions before storing them and replace all sessions successfully. + +#### getSessions `(chainId: CaipNetworkId, address: string) => Promise` + +This method will be called to get all the sessions stored for a specific chain and address. It must return only sessions that are verified and valid, and must not return expired sessions. + +#### getRequired `() => boolean` (Optional) + +This method determines whether the wallet stays connected when the user denies the signature request. + +#### signOutOnDisconnect `boolean` (Optional) + +- defaults to `true` + +Whether or not to clear sessions when the user disconnects their wallet. + All the typings used are exposed by `@reown/appkit-core` package. You may check the source code [here](https://github.com/reown-com/appkit/blob/main/packages/core/src/utils/SIWXUtil.ts).