Sanctum Client Usage Walkthrough

This page demonstrates the full SDK flow: initialize config, initialize widget auth, then call core APIs with live token state and logs.

1

Initialize Sanctum Config

Call initSanctum(config) with your URL + optional settings.

Not initialized yet.
2

Initialize Widget + Authenticate

Call SanctumWidget.init(...) and complete auth in the widget.

Not authenticated.
3

Core API Playground (after auth)

These call SanctumAPI methods. Controls are enabled only when token data exists.

Quick Calls

signEvent(eventJson)

encrypt/decrypt (NIP-44)

createAuthHeader(url, method, body?)

Token State

Loading...

Logs