========== PKP ==========

Hierarchy (view full)

Implements

Constructors

Properties

connectedNodes: Set<string> = ...
defaultAuthCallback?: ((authSigParams: AuthCallbackParams) => Promise<AuthSig>)
hdRootPubkeys: string[] = null
lastBlockHashRetrieved: number = null
latestBlockhash: string = null
networkPubKey: string = null
networkPubKeySet: string = null
ready: boolean = false
serverKeys: Record<string, JsonHandshakeResponse> = {}
subnetPubKey: string = null

Accessors

Methods

  • Calculates a Key Id for claiming a pkp based on a user identifier and an app identifier. The key Identifier is an Auth Method Id which scopes the key uniquely to a specific application context. These identifiers are specific to each auth method and will derive the public key portion of a pkp which will be persisted when a key is claimed.

    Auth Method User ID App ID
    Google OAuth token sub token aud
    Discord OAuth user id client app identifier
    Stytch OTP token sub token aud
    Lit Actions user defined ipfs cid
    Note Lit Action claiming uses a different schema than other auth methods

    Parameters

    • userId: string

      user identifier for the Key Identifier

    • appId: string

      app identifier for the Key Identifier

    • isForActionContext: boolean = false

      should be set for true if using claiming through actions

    Returns string

    public key of pkp when claimed

  • Retrieves the session signature for a given URL from the sessionSigs map. Throws an error if sessionSigs is not provided or if the session signature for the URL is not found.

    Parameters

    Returns AuthSig

    The session signature for the given URL.

    An error if sessionSigs is not provided or if the session signature for the URL is not found.