ReadonlyauthorizationReturn the authorization deep link (URL) to show as QR or open on the signer device.
Static ReadonlyisWhether delegated grant auth is available in the current JS runtime.
This checks for a secure browser context with WebCrypto crypto.subtle
and IndexedDB. It is a coarse synchronous feature-detection helper only;
some runtimes expose those primitives without Ed25519 support.
Block until the user approves on their signer device; returns a grant-backed Session.
Save sensitive state required to resume this delegated pending grant flow.
This does not export the delegated private key, but it includes the relay secret in the authorization URL. Store it only temporarily and delete it once the flow completes or is abandoned.
Save sensitive state required to resume this pending local grant flow.
Opaque state for GrantAuthFlow.resume() or
pubky.resumeGrantAuthFlow().
Non-blocking single poll step (advanced UIs).
A session if the approval arrived, otherwise undefined.
StaticresumeResume a previously saved pending grant auth flow (standalone).
Prefer pubky.resumeGrantAuthFlow() to reuse a facade client.
Security: savedState contains the relay secret and PoP client private key.
Store it only temporarily and delete it once the flow completes or is abandoned.
A flow reconnected to the original relay channel.
StaticresumeResume a previously saved pending delegated grant auth flow.
Runtime: delegated grant keys require a secure browser context with
WebCrypto crypto.subtle and IndexedDB. The saved keyId must still
exist in IndexedDB for the same origin. Unsupported runtimes reject with
ClientStateError.
StaticstartStart a grant-backed flow with a new DHT client.
Prefer pubky.startGrantAuthFlow() to reuse a facade DHT client.
Comma-separated capabilities, e.g. "/pub/app/:rw,/priv/foo.txt:r".
Empty string is allowed (no scopes).
The kind of authentication flow to perform.
Options for the grant flow: { clientId, relay?, xCallback? }.
A running grant auth flow. Call authorizationUrl() to show the deep link,
then awaitApproval() to receive a grant-backed Session.
StaticstartStart a browser delegated grant-backed flow.
The SDK creates a fresh non-extractable WebCrypto Ed25519 key in IndexedDB and uses that key for grant Proof-of-Possession signing.
Runtime: delegated grant keys require a secure browser context with
WebCrypto crypto.subtle and IndexedDB. Unsupported runtimes reject
with ClientStateError.
Start and control a grant-backed pubkyauth authorization flow.
Typical flow:
GrantAuthFlow.start(...)orpubky.startGrantAuthFlow(...)authorizationUrl()as QR/deeplink to the user's signing deviceawaitApproval()to receive a grant-backed, self-refreshingSession