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

Hierarchy

Implements

Constructors

Properties

defaultAuthCallback?: ((authSigParams: AuthCallbackParams) => Promise<AuthSig>)

Type declaration

Methods

  • Check if a session key needs to be resigned. These are the scenarios where a session key needs to be resigned:

    1. The authSig.sig does not verify successfully against the authSig.signedMessage
    2. The authSig.signedMessage.uri does not match the sessionKeyUri
    3. The authSig.signedMessage does not contain at least one session capability object

    Parameters

    Returns Promise<boolean>

  • Get session signatures for a set of resources

    High level, how this works:

    1. Generate or retrieve session key
    2. Generate or retrieve the wallet signature of the session key
    3. Sign the specific resources with the session key

    Note: When generating session signatures for different PKPs or auth methods, be sure to call disconnectWeb3 to clear auth signatures stored in local storage

    Example

    import { LitPKPResource, LitActionResource } from "@lit-protocol/auth-helpers";
    import { LitAbility } from "@lit-protocol/types";
    import { logWithRequestId } from '../../../misc/src/lib/misc';

    const resourceAbilityRequests = [
    {
    resource: new LitPKPResource("*"),
    ability: LitAbility.PKPSigning,
    },
    {
    resource: new LitActionResource("*"),
    ability: LitAbility.LitActionExecution,
    },
    ];

    Parameters

    Returns Promise<SessionSigsMap>

Generated using TypeDoc