@synonymdev/pubky
    Preparing search index...

    Class GrantSession

    Grant-only view over a grant-backed Session.

    Cookie-backed sessions do not expose this view; use session.grant and check for undefined before calling grant-session methods.

    Index
    encryptionKeys: EncryptionKeys | undefined

    Return scoped keys with the same derivation API as offline recovered keys. Bare grants return undefined; signed approvals without e scopes return an object with empty scopes. Each access creates an owned copy. Keep it for repeated use and call free() when finished. It remains usable after this view or its session is freed, signed out, or revoked; freeing it does not affect the session.

    • Returns void

    • Sign JSON data and return both the custom proof and its root-signed grant. Data follows JSON.stringify semantics, e.g. undefined properties are omitted. Each proof carries its signing time (iat) and a random nonce. Makes no network requests. Your applications handle freshness and replay protection.

      Parameters

      Returns Promise<CustomPop>

    • Export the portable local secret material needed to restore this grant session.

      Treat the returned string as bearer-equivalent secret material until the grant expires or is revoked. Included scoped keys remain sensitive after expiry or revocation.

      Returns Promise<string>

    • Returns void

    • Current grant id (jti) backing this session.

      Returns Promise<string>